From 6b3980c23c4d76c955a9d100472da8dd6d172fd9 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Wed, 17 Jul 2024 09:59:46 -0700 Subject: [PATCH] chore(octoprint): misc changes --- nixos/cameras/printer.nix | 4 ++-- nixos/motion.nix | 4 ++++ nixos/octoprint.nix | 12 ++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/nixos/cameras/printer.nix b/nixos/cameras/printer.nix index 24321729..e09553fa 100644 --- a/nixos/cameras/printer.nix +++ b/nixos/cameras/printer.nix @@ -9,8 +9,8 @@ in { services.motion.cameras.printercam.settings = mapDefaults { videodevice = "/dev/printercam"; - width = 640; - height = 480; + width = 1280; + height = 720; framerate = 5; camera_id = 2; text_left = ""; diff --git a/nixos/motion.nix b/nixos/motion.nix index 8e9ee02a..5226ee03 100644 --- a/nixos/motion.nix +++ b/nixos/motion.nix @@ -1,4 +1,5 @@ { + pkgs, config, gensokyo-zone, lib, @@ -37,4 +38,7 @@ in { networking.firewall.interfaces.local = mkIf cfg.enable { allowedTCPPorts = [cfg.settings.stream_port cfg.settings.webcontrol_port]; }; + environment.systemPackages = [ + pkgs.v4l-utils + ]; } diff --git a/nixos/octoprint.nix b/nixos/octoprint.nix index 4fdbb01f..d5253a72 100644 --- a/nixos/octoprint.nix +++ b/nixos/octoprint.nix @@ -49,6 +49,7 @@ in { _disabled = [ "softwareupdate" ]; + PrintTimeGenius.showStars = false; }; temperature = { profiles = [ @@ -94,6 +95,9 @@ in { printing_cancelled = { message = "Print cancelled after {time_formatted}"; }; + printing_done = { + message = "Print complete after {time_formatted}"; + }; printing_paused = { message = "Print paused"; media = media.none; @@ -140,7 +144,7 @@ in { ffmpegThreads = 2; timelapse = { fps = 25; - options.interval = 3; + options.interval = 4; postRoll = 0; type = "timed"; }; @@ -153,7 +157,7 @@ in { _config_version = 1; snapshot = "https://kitchen.local.${domain}/${toString camera_id}/current"; stream = "https://kitchen.local.${domain}/${toString camera_id}/stream"; - streamRatio = "4:3"; + streamRatio = "16:9"; }; }; }) @@ -186,4 +190,8 @@ in { cfg.port ]; }; + + systemd.services.octoprint = mkIf cfg.enable { + restartIfChanged = false; + }; }