From 38f7f200a58a5b9632419aef4bdbd92107cc1045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Mon, 22 Jun 2026 12:41:34 +0200 Subject: [PATCH] remove containers now managed by hyperhive --- devices.nix | 8 -- nixosConfigurations/damocles-lab/default.nix | 16 ---- nixosConfigurations/damocles/android-dev.nix | 43 ----------- .../damocles/claude-container.nix | 47 ------------ nixosConfigurations/damocles/default.nix | 15 ---- nixosConfigurations/muede-lpt2/containers.nix | 73 +++++++------------ 6 files changed, 25 insertions(+), 177 deletions(-) delete mode 100644 nixosConfigurations/damocles-lab/default.nix delete mode 100644 nixosConfigurations/damocles/android-dev.nix delete mode 100644 nixosConfigurations/damocles/claude-container.nix delete mode 100644 nixosConfigurations/damocles/default.nix diff --git a/devices.nix b/devices.nix index 26a274d..8022b6f 100644 --- a/devices.nix +++ b/devices.nix @@ -13,14 +13,6 @@ in system = "aarch64-linux"; nixosSystem = nixos-raspberrypi.lib.nixosInstaller; }; - damocles = { - system = "x86_64-linux"; - distributedBuilds.maxJobs = 0; - }; - damocles-lab = { - system = "x86_64-linux"; - distributedBuilds.maxJobs = 0; - }; epimetheus = { system = "aarch64-linux"; }; diff --git a/nixosConfigurations/damocles-lab/default.nix b/nixosConfigurations/damocles-lab/default.nix deleted file mode 100644 index 705e31a..0000000 --- a/nixosConfigurations/damocles-lab/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: -{ - imports = [ ../damocles/claude-container.nix ]; - - services.openssh = { - enable = true; - ports = [ 2222 ]; - # Path written into sshd_config as a string — not read at eval time. - # Key can be rotated without a rebuild. - authorizedKeysFiles = [ "/persist/damocles-ssh/id_ed25519.pub" ]; - }; - - environment.systemPackages = with pkgs; [ - - ]; -} diff --git a/nixosConfigurations/damocles/android-dev.nix b/nixosConfigurations/damocles/android-dev.nix deleted file mode 100644 index f484e6a..0000000 --- a/nixosConfigurations/damocles/android-dev.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ pkgs, ... }: -let - androidComposition = pkgs.androidenv.composeAndroidPackages { - buildToolsVersions = [ "36.1.0" ]; - platformVersions = [ "35" ]; - includeNDK = false; - includeEmulator = false; - includeSystemImages = false; - }; - androidSdk = androidComposition.androidsdk; -in -{ - nixpkgs.config.android_sdk.accept_license = true; - - my.allowedUnfreePackages = [ - "android-sdk-cmdline-tools" - "android-sdk-platform-tools" - "android-sdk-tools" - "android-sdk-build-tools" - "android-sdk-platforms" - - # wtf - "platform-tools" - "tools" - "build-tools" - "cmdline-tools" - "platforms" - "cmake" # android sdk repackage - ]; - - environment.systemPackages = with pkgs; [ - androidSdk - gradle - kotlin - jdk21 - ]; - - environment.variables = { - ANDROID_HOME = "${androidSdk}/libexec/android-sdk"; - ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk"; - JAVA_HOME = "${pkgs.jdk21}"; - }; -} diff --git a/nixosConfigurations/damocles/claude-container.nix b/nixosConfigurations/damocles/claude-container.nix deleted file mode 100644 index a91c661..0000000 --- a/nixosConfigurations/damocles/claude-container.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - pkgs, - lib, - ... -}: -{ - - my = { - allowedUnfreePackages = [ "claude-code" ]; - overlays.unstable.enable = true; - }; - - environment.systemPackages = with pkgs; [ - unstable.claude-code - git - python3 - coreutils-full - gawk - gnugrep - curl - bintools - file - ]; - - boot.isContainer = true; - - programs.nix-ld = { - enable = true; - libraries = with pkgs; [ - stdenv.cc.cc.lib - zlib - ]; - }; - - # Container shares host network namespace (privateNetwork = false), so the - # host's tailscale already covers this. Running a second tailscaled in the - # same netns fights over routing and breaks connectivity after sleep/wake. - services.tailscale.enable = lib.mkForce false; - networking.firewall.checkReversePath = lib.mkForce "strict"; - - users.users.muede = { - isNormalUser = true; - extraGroups = [ "wheel" ]; - }; - - security.sudo.wheelNeedsPassword = false; -} diff --git a/nixosConfigurations/damocles/default.nix b/nixosConfigurations/damocles/default.nix deleted file mode 100644 index a511d47..0000000 --- a/nixosConfigurations/damocles/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ pkgs, ... }: -{ - imports = [ - ./android-dev.nix - ./claude-container.nix - ]; - - environment.systemPackages = with pkgs; [ - cargo - rustc - clippy - gh - buildPackages.stdenv.cc - ]; -} diff --git a/nixosConfigurations/muede-lpt2/containers.nix b/nixosConfigurations/muede-lpt2/containers.nix index 7033b52..ff0e4d5 100644 --- a/nixosConfigurations/muede-lpt2/containers.nix +++ b/nixosConfigurations/muede-lpt2/containers.nix @@ -4,54 +4,31 @@ 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 = { + # 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"; - }; + # # 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"; + # }; }; }