diff --git a/flake.lock b/flake.lock index a74a893..764d421 100644 --- a/flake.lock +++ b/flake.lock @@ -143,21 +143,6 @@ "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": [ @@ -651,7 +636,6 @@ }, "nova-shell": { "inputs": { - "crane": "crane_2", "nixpkgs": [ "nixpkgs-unstable" ], @@ -659,11 +643,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1778180483, - "narHash": "sha256-35cMiZn5DAnYFpKFdWg5dxW7hLO3/ey743ED6yV3pL8=", + "lastModified": 1777656272, + "narHash": "sha256-OcxjycGuzEeU6ZbX4SjSx4YVKcDlaZm8gdSvEFGowoo=", "ref": "refs/heads/main", - "rev": "dfa3840d97186fef3480b49f289acd3ae707ee27", - "revCount": 626, + "rev": "40cc681e9a36320659175f240e9ccc3f3041a7e9", + "revCount": 598, "type": "git", "url": "https://git.berlin.ccc.de/vinzenz/nova-shell" }, diff --git a/homeConfigurations/muede/default.nix b/homeConfigurations/muede/default.nix index c2293ca..17c66a0 100644 --- a/homeConfigurations/muede/default.nix +++ b/homeConfigurations/muede/default.nix @@ -73,7 +73,6 @@ arduino arduino-cli arduino-ide - btop claude-code dconf2nix foliate diff --git a/nixosConfigurations.nix b/nixosConfigurations.nix index 6082283..55af611 100644 --- a/nixosConfigurations.nix +++ b/nixosConfigurations.nix @@ -66,8 +66,6 @@ forDevice ( doc.enable = false; }; - time.timeZone = lib.mkDefault "Etc/UTC"; - my = { # keep-sorted start autoupdate.enable = true; diff --git a/nixosConfigurations/damocles/claude-container.nix b/nixosConfigurations/damocles/claude-container.nix index 8093878..aea9343 100644 --- a/nixosConfigurations/damocles/claude-container.nix +++ b/nixosConfigurations/damocles/claude-container.nix @@ -18,7 +18,6 @@ gawk gnugrep curl - bintools ]; boot.isContainer = true; diff --git a/nixosConfigurations/damocles/default.nix b/nixosConfigurations/damocles/default.nix index a511d47..c5eff0a 100644 --- a/nixosConfigurations/damocles/default.nix +++ b/nixosConfigurations/damocles/default.nix @@ -10,6 +10,5 @@ rustc clippy gh - buildPackages.stdenv.cc ]; } diff --git a/nixosConfigurations/muede-lpt2/containers.nix b/nixosConfigurations/muede-lpt2/containers.nix deleted file mode 100644 index 7033b52..0000000 --- a/nixosConfigurations/muede-lpt2/containers.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ 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 be7927c..f52d735 100644 --- a/nixosConfigurations/muede-lpt2/default.nix +++ b/nixosConfigurations/muede-lpt2/default.nix @@ -1,7 +1,6 @@ { self, ... }: { imports = [ - ./containers.nix ./hardware.nix ]; @@ -65,5 +64,58 @@ ]; 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; }; } diff --git a/nixosModules/openssh.nix b/nixosModules/openssh.nix index 92eb5f6..f1ba770 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_session) + open) ${pkgs.systemd}/bin/systemd-inhibit \ --what=sleep \ --who=sshd \ @@ -38,7 +38,7 @@ sleep infinity & echo $! > "$PIDFILE" ;; - close_session) + close) if [ -f "$PIDFILE" ]; then kill "$(cat "$PIDFILE")" 2>/dev/null || true rm -f "$PIDFILE"