remove containers now managed by hyperhive

This commit is contained in:
müde 2026-06-22 12:41:34 +02:00
commit 38f7f200a5
6 changed files with 25 additions and 177 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -1,15 +0,0 @@
{ pkgs, ... }:
{
imports = [
./android-dev.nix
./claude-container.nix
];
environment.systemPackages = with pkgs; [
cargo
rustc
clippy
gh
buildPackages.stdenv.cc
];
}

View file

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