Compare commits

...
Author SHA1 Message Date
müde
5188d951ef misc installs 2026-05-07 23:10:49 +02:00
müde
1ca757fe95 update nova-shell 2026-05-07 21:09:22 +02:00
müde
9d2ecaa010 lpt2: split containers 2026-05-07 18:21:38 +02:00
müde
90dfef044c ssh: fix prevent sleep on open ssh conn 2026-05-06 23:32:08 +02:00
müde
edc2e50a9b timezone UTC for non desktop devices 2026-05-03 23:26:37 +02:00
8 changed files with 85 additions and 59 deletions

24
flake.lock generated
View file

@ -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"
},

View file

@ -73,6 +73,7 @@
arduino
arduino-cli
arduino-ide
btop
claude-code
dconf2nix
foliate

View file

@ -66,6 +66,8 @@ forDevice (
doc.enable = false;
};
time.timeZone = lib.mkDefault "Etc/UTC";
my = {
# keep-sorted start
autoupdate.enable = true;

View file

@ -18,6 +18,7 @@
gawk
gnugrep
curl
bintools
];
boot.isContainer = true;

View file

@ -10,5 +10,6 @@
rustc
clippy
gh
buildPackages.stdenv.cc
];
}

View file

@ -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";
};
};
}

View file

@ -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;
};
}

View file

@ -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"