From edc2e50a9bde2b2b3c46defd906137d201656ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Sun, 3 May 2026 23:26:37 +0200 Subject: [PATCH 1/5] timezone UTC for non desktop devices --- nixosConfigurations.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixosConfigurations.nix b/nixosConfigurations.nix index 55af611..6082283 100644 --- a/nixosConfigurations.nix +++ b/nixosConfigurations.nix @@ -66,6 +66,8 @@ forDevice ( doc.enable = false; }; + time.timeZone = lib.mkDefault "Etc/UTC"; + my = { # keep-sorted start autoupdate.enable = true; From 90dfef044ce781bfc49ad5e09487e6c1e16c7707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Wed, 6 May 2026 23:32:08 +0200 Subject: [PATCH 2/5] ssh: fix prevent sleep on open ssh conn --- nixosModules/openssh.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixosModules/openssh.nix b/nixosModules/openssh.nix index f1ba770..92eb5f6 100644 --- a/nixosModules/openssh.nix +++ b/nixosModules/openssh.nix @@ -29,7 +29,7 @@ "${pkgs.writeShellScript "ssh-inhibit-pam" '' PIDFILE="/run/ssh-inhibitor-''${PPID}.pid" case "''${PAM_TYPE:-}" in - open) + open_session) ${pkgs.systemd}/bin/systemd-inhibit \ --what=sleep \ --who=sshd \ @@ -38,7 +38,7 @@ sleep infinity & echo $! > "$PIDFILE" ;; - close) + close_session) if [ -f "$PIDFILE" ]; then kill "$(cat "$PIDFILE")" 2>/dev/null || true rm -f "$PIDFILE" From 9d2ecaa0105c3a1775fc852d14290c425a34f58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Thu, 7 May 2026 18:21:38 +0200 Subject: [PATCH 3/5] lpt2: split containers --- nixosConfigurations/muede-lpt2/containers.nix | 57 +++++++++++++++++++ nixosConfigurations/muede-lpt2/default.nix | 54 +----------------- 2 files changed, 58 insertions(+), 53 deletions(-) create mode 100644 nixosConfigurations/muede-lpt2/containers.nix diff --git a/nixosConfigurations/muede-lpt2/containers.nix b/nixosConfigurations/muede-lpt2/containers.nix new file mode 100644 index 0000000..7033b52 --- /dev/null +++ b/nixosConfigurations/muede-lpt2/containers.nix @@ -0,0 +1,57 @@ +{ self, ... }: +{ + config = { + boot.enableContainers = true; + virtualisation.containers.enable = true; + + containers.damocles = { + autoStart = false; + privateNetwork = false; + path = self.nixosConfigurations.damocles.config.system.build.toplevel; + bindMounts."/etc/nix/distributed-build-key" = { + hostPath = "/etc/nix/distributed-build-key"; + isReadOnly = true; + }; + bindMounts."/persist/damocles-ssh" = { + hostPath = "/persist/damocles-ssh"; + isReadOnly = true; + }; + bindMounts."/persist/damocles-lab" = { + hostPath = "/persist/damocles-lab"; + isReadOnly = false; + }; + }; + + containers.damocles-lab = { + autoStart = false; + privateNetwork = false; + path = self.nixosConfigurations.damocles-lab.config.system.build.toplevel; + bindMounts."/etc/nix/distributed-build-key" = { + hostPath = "/etc/nix/distributed-build-key"; + isReadOnly = true; + }; + bindMounts."/workspace" = { + hostPath = "/persist/damocles-lab"; + isReadOnly = false; + }; + bindMounts."/persist/damocles-ssh" = { + hostPath = "/persist/damocles-ssh"; + isReadOnly = true; + }; + }; + + # Global DefaultTimeoutStopSec is 10s (modern-desktop.nix), which kills systemd-nspawn + # before it finishes halting, leaving cgroups busy and breaking restarts. + systemd.services."container@damocles".serviceConfig = { + TimeoutStopSec = "60s"; + # After a SIGKILL of nspawn, the kernel needs a moment to reap its cgroups. + # Without this, the immediate restart attempt fails with "Device or resource busy". + RestartSec = "5s"; + }; + + systemd.services."container@damocles-lab".serviceConfig = { + TimeoutStopSec = "60s"; + RestartSec = "5s"; + }; + }; +} diff --git a/nixosConfigurations/muede-lpt2/default.nix b/nixosConfigurations/muede-lpt2/default.nix index f52d735..be7927c 100644 --- a/nixosConfigurations/muede-lpt2/default.nix +++ b/nixosConfigurations/muede-lpt2/default.nix @@ -1,6 +1,7 @@ { self, ... }: { imports = [ + ./containers.nix ./hardware.nix ]; @@ -64,58 +65,5 @@ ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; - - containers.damocles = { - autoStart = false; - privateNetwork = false; - path = self.nixosConfigurations.damocles.config.system.build.toplevel; - bindMounts."/etc/nix/distributed-build-key" = { - hostPath = "/etc/nix/distributed-build-key"; - isReadOnly = true; - }; - bindMounts."/persist/damocles-ssh" = { - hostPath = "/persist/damocles-ssh"; - isReadOnly = true; - }; - bindMounts."/persist/damocles-lab" = { - hostPath = "/persist/damocles-lab"; - isReadOnly = false; - }; - }; - - containers.damocles-lab = { - autoStart = false; - privateNetwork = false; - path = self.nixosConfigurations.damocles-lab.config.system.build.toplevel; - bindMounts."/etc/nix/distributed-build-key" = { - hostPath = "/etc/nix/distributed-build-key"; - isReadOnly = true; - }; - bindMounts."/workspace" = { - hostPath = "/persist/damocles-lab"; - isReadOnly = false; - }; - bindMounts."/persist/damocles-ssh" = { - hostPath = "/persist/damocles-ssh"; - isReadOnly = true; - }; - }; - - # Global DefaultTimeoutStopSec is 10s (modern-desktop.nix), which kills systemd-nspawn - # before it finishes halting, leaving cgroups busy and breaking restarts. - systemd.services."container@damocles".serviceConfig = { - TimeoutStopSec = "60s"; - # After a SIGKILL of nspawn, the kernel needs a moment to reap its cgroups. - # Without this, the immediate restart attempt fails with "Device or resource busy". - RestartSec = "5s"; - }; - - systemd.services."container@damocles-lab".serviceConfig = { - TimeoutStopSec = "60s"; - RestartSec = "5s"; - }; - - boot.enableContainers = true; - virtualisation.containers.enable = true; }; } From 1ca757fe95faad6f23fc0369222384502d9fda11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Thu, 7 May 2026 21:09:22 +0200 Subject: [PATCH 4/5] update nova-shell --- flake.lock | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 764d421..a74a893 100644 --- a/flake.lock +++ b/flake.lock @@ -143,6 +143,21 @@ "type": "github" } }, + "crane_2": { + "locked": { + "lastModified": 1777830388, + "narHash": "sha256-2uoQAqUk2H0ijQtGiWAyNeQYGYc6yfAcRRLlJAz4Gp8=", + "owner": "ipetkov", + "repo": "crane", + "rev": "d459c1350e96ce1a7e3859c513ef5e9869d67d6f", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -636,6 +651,7 @@ }, "nova-shell": { "inputs": { + "crane": "crane_2", "nixpkgs": [ "nixpkgs-unstable" ], @@ -643,11 +659,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1777656272, - "narHash": "sha256-OcxjycGuzEeU6ZbX4SjSx4YVKcDlaZm8gdSvEFGowoo=", + "lastModified": 1778180483, + "narHash": "sha256-35cMiZn5DAnYFpKFdWg5dxW7hLO3/ey743ED6yV3pL8=", "ref": "refs/heads/main", - "rev": "40cc681e9a36320659175f240e9ccc3f3041a7e9", - "revCount": 598, + "rev": "dfa3840d97186fef3480b49f289acd3ae707ee27", + "revCount": 626, "type": "git", "url": "https://git.berlin.ccc.de/vinzenz/nova-shell" }, From 5188d951ef09aede3706331114adeb55f7fead31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Thu, 7 May 2026 23:10:49 +0200 Subject: [PATCH 5/5] misc installs --- homeConfigurations/muede/default.nix | 1 + nixosConfigurations/damocles/claude-container.nix | 1 + nixosConfigurations/damocles/default.nix | 1 + 3 files changed, 3 insertions(+) diff --git a/homeConfigurations/muede/default.nix b/homeConfigurations/muede/default.nix index 17c66a0..c2293ca 100644 --- a/homeConfigurations/muede/default.nix +++ b/homeConfigurations/muede/default.nix @@ -73,6 +73,7 @@ arduino arduino-cli arduino-ide + btop claude-code dconf2nix foliate diff --git a/nixosConfigurations/damocles/claude-container.nix b/nixosConfigurations/damocles/claude-container.nix index aea9343..8093878 100644 --- a/nixosConfigurations/damocles/claude-container.nix +++ b/nixosConfigurations/damocles/claude-container.nix @@ -18,6 +18,7 @@ gawk gnugrep curl + bintools ]; boot.isContainer = true; diff --git a/nixosConfigurations/damocles/default.nix b/nixosConfigurations/damocles/default.nix index c5eff0a..a511d47 100644 --- a/nixosConfigurations/damocles/default.nix +++ b/nixosConfigurations/damocles/default.nix @@ -10,5 +10,6 @@ rustc clippy gh + buildPackages.stdenv.cc ]; }