mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(motion): logistics webcam
but also disable for now
This commit is contained in:
parent
6b3ba157a4
commit
33b18bc348
3 changed files with 31 additions and 5 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (gensokyo-zone.lib) mapDefaults;
|
inherit (gensokyo-zone.lib) mapDefaults;
|
||||||
|
inherit (lib.strings) concatStringsSep;
|
||||||
inherit (config.services) motion;
|
inherit (config.services) motion;
|
||||||
format = "mjpeg"; # or "yuyv"
|
format = "mjpeg"; # or "yuyv"
|
||||||
params = {
|
params = {
|
||||||
|
|
@ -22,7 +23,12 @@
|
||||||
in {
|
in {
|
||||||
services.motion.cameras.livingcam.settings = mapDefaults {
|
services.motion.cameras.livingcam.settings = mapDefaults {
|
||||||
video_device = "/dev/livingcam";
|
video_device = "/dev/livingcam";
|
||||||
video_params = "auto_brightness=2,brightness=72,power_line_frequency=2,palette=${toString params.${format}.palette}";
|
video_params = concatStringsSep "," [
|
||||||
|
#"auto_brightness=2"
|
||||||
|
"brightness=56"
|
||||||
|
"power_line_frequency=2"
|
||||||
|
"palette=${toString params.${format}.palette}"
|
||||||
|
];
|
||||||
inherit (params.${format}) width height;
|
inherit (params.${format}) width height;
|
||||||
#framerate = 30;
|
#framerate = 30;
|
||||||
framerate = 20;
|
framerate = 20;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,14 @@
|
||||||
{gensokyo-zone, ...}: let
|
{
|
||||||
|
config,
|
||||||
|
gensokyo-zone,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (config.services) motion;
|
||||||
inherit (gensokyo-zone.lib) mapDefaults;
|
inherit (gensokyo-zone.lib) mapDefaults;
|
||||||
in {
|
in {
|
||||||
services.motion.cameras.webcam.settings = mapDefaults {
|
services.motion.cameras.webcam.settings = mapDefaults {
|
||||||
video_device = "/dev/video0";
|
video_device = "/dev/webcam";
|
||||||
video_params = "palette=15";
|
video_params = "palette=15";
|
||||||
width = 1280;
|
width = 1280;
|
||||||
height = 720;
|
height = 720;
|
||||||
|
|
@ -10,4 +16,19 @@ in {
|
||||||
framerate = 3;
|
framerate = 3;
|
||||||
text_left = "logistics";
|
text_left = "logistics";
|
||||||
};
|
};
|
||||||
|
services.udev.extraRules = let
|
||||||
|
inherit (lib.strings) concatStringsSep;
|
||||||
|
rules = [
|
||||||
|
''SUBSYSTEM=="video4linux"''
|
||||||
|
''ATTR{index}=="0"''
|
||||||
|
''ATTRS{idVendor}=="5986"''
|
||||||
|
''ATTRS{idProduct}=="111c"''
|
||||||
|
''SYMLINK+="webcam"''
|
||||||
|
''OWNER="${motion.user}"''
|
||||||
|
''TAG+="systemd"''
|
||||||
|
''ENV{SYSTEMD_WANTS}="motion.service"''
|
||||||
|
];
|
||||||
|
rulesLine = concatStringsSep ", " rules;
|
||||||
|
in
|
||||||
|
rulesLine;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ in {
|
||||||
mouse.naturalScrolling = config.services.libinput.touchpad.naturalScrolling;
|
mouse.naturalScrolling = config.services.libinput.touchpad.naturalScrolling;
|
||||||
};
|
};
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
|
services.motion.cameras.webcam.enable = false;
|
||||||
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
|
@ -52,8 +53,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
# XXX: currently broken in nixpkgs
|
|
||||||
# pkgs.cura-octoprint
|
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.logistics = {
|
users.users.logistics = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue