This commit is contained in:
@ -20,3 +20,10 @@ SD card | `/dev/mmcblk0` (ext4, NixOS Root)
|
||||
## Devices and connections
|
||||
- Camera Module 3 with wide-angle lens
|
||||
|
||||
## Building
|
||||
To generate a compressed SD card image for Skycam, run:
|
||||
`nix build '.#nixosConfigurations.skycam.config.system.build.sdImage'`
|
||||
|
||||
Once a card is imaged, the existing SSH host keys should be copied to
|
||||
`/etc/ssh` manually to enable secret decryption.
|
||||
|
||||
|
@ -42,7 +42,6 @@
|
||||
};
|
||||
firmware = with pkgs; [
|
||||
firmwareLinuxNonfree
|
||||
wireless-regdb
|
||||
];
|
||||
};
|
||||
|
||||
@ -67,13 +66,31 @@
|
||||
|
||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
||||
|
||||
systemd.services.ustreamer = {
|
||||
enable = true;
|
||||
description = "uStreamer service";
|
||||
unitConfig = {
|
||||
Type = "simple";
|
||||
ConditionPathExists = "/sys/bus/i2c/drivers/imx708/10-001a/video4linux";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = ''${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \
|
||||
--host=0.0.0.0 \
|
||||
--resolution=4608x2592
|
||||
'';
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
};
|
||||
wantedBy = [ "network-online.target" ];
|
||||
confinement.mode = "chroot-only";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
camera-streamer
|
||||
git
|
||||
neovim
|
||||
libcamera
|
||||
libraspberrypi
|
||||
raspberrypi-eeprom
|
||||
rpicam-apps
|
||||
v4l-utils
|
||||
unstable.ustreamer
|
||||
];
|
||||
|
@ -7,9 +7,12 @@
|
||||
|
||||
boot = {
|
||||
kernelModules = [ "bcm2835-v4l2" ];
|
||||
kernelParams = [ "cma=512M" ];
|
||||
supportedFilesystems = lib.mkForce [ "f2fs" "vfat xfs" ];
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelParams = [
|
||||
"cma=512M"
|
||||
"panic=0"
|
||||
];
|
||||
supportedFilesystems = lib.mkForce [ "f2fs" "vfat" "xfs" ];
|
||||
tmp.cleanOnBoot = false;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
Reference in New Issue
Block a user