diff --git a/flake.lock b/flake.lock index 81cbe9f..8f7fd71 100644 --- a/flake.lock +++ b/flake.lock @@ -115,6 +115,39 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flakey-profile": { + "locked": { + "lastModified": 1712898590, + "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", + "owner": "lf-", + "repo": "flakey-profile", + "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", + "type": "github" + }, + "original": { + "owner": "lf-", + "repo": "flakey-profile", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -177,6 +210,44 @@ "type": "github" } }, + "lix": { + "flake": false, + "locked": { + "lastModified": 1729298361, + "narHash": "sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U=", + "rev": "ad9d06f7838a25beec425ff406fe68721fef73be", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/ad9d06f7838a25beec425ff406fe68721fef73be.tar.gz?rev=ad9d06f7838a25beec425ff406fe68721fef73be" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/lix/archive/2.91.1.tar.gz" + } + }, + "lix-module": { + "inputs": { + "flake-utils": "flake-utils_2", + "flakey-profile": "flakey-profile", + "lix": "lix", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729360442, + "narHash": "sha256-6U0CyPycIBc04hbYy2hBINnVso58n/ZyywY2BD3hu+s=", + "ref": "stable", + "rev": "2bbdcd73b9a464f8acf45a7100feb979883ba485", + "revCount": 110, + "type": "git", + "url": "https://git.lix.systems/lix-project/nixos-module" + }, + "original": { + "ref": "stable", + "type": "git", + "url": "https://git.lix.systems/lix-project/nixos-module" + } + }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -324,6 +395,7 @@ "colmena": "colmena", "home-manager": "home-manager_2", "home-manager-unstable": "home-manager-unstable", + "lix-module": "lix-module", "nixpkgs": "nixpkgs", "nixpkgs-small": "nixpkgs-small", "nixpkgs-unstable": "nixpkgs-unstable", @@ -363,6 +435,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 807f3b0..11b6748 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,11 @@ nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable-small.url = "github:NixOS/nixpkgs/nixos-unstable-small"; + lix-module = { + url = "git+https://git.lix.systems/lix-project/nixos-module?ref=stable"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; @@ -50,7 +55,7 @@ birdsong.url = "git+https://git.qenya.tel/qenya/birdsong?ref=main"; }; - outputs = inputs@{ self, nixpkgs, nixpkgs-small, home-manager, plasma-manager, nur, agenix, colmena, randomcat, actual, birdsong, ... }: { + outputs = inputs@{ self, nixpkgs, nixpkgs-small, lix-module, home-manager, plasma-manager, nur, agenix, colmena, randomcat, actual, birdsong, ... }: { nixosConfigurations = (colmena.lib.makeHive self.outputs.colmena).nodes; # The name of this output type is not standardised. I have picked @@ -87,6 +92,7 @@ deployment.targetHost = lib.mkDefault null; imports = [ + lix-module.nixosModules.default home-manager.nixosModules.home-manager nur.nixosModules.nur { nixpkgs.overlays = [ nur.overlay ]; } diff --git a/hosts/kalessin/default.nix b/hosts/kalessin/default.nix index 77992e5..ef0157e 100644 --- a/hosts/kalessin/default.nix +++ b/hosts/kalessin/default.nix @@ -22,12 +22,10 @@ in qenya.services.remote-builder = { enable = true; authorizedKeys.keys = [ + keys.machines.kilgharrah keys.machines.tohru - keys.machines.yevaud - keys.machines.orm ]; }; - boot.binfmt.emulatedSystems = [ "x86_64-linux" ]; system.stateVersion = "23.11"; } diff --git a/hosts/kilgharrah/default.nix b/hosts/kilgharrah/default.nix index f656149..4ac9a04 100644 --- a/hosts/kilgharrah/default.nix +++ b/hosts/kilgharrah/default.nix @@ -40,11 +40,12 @@ in qenya.services.remote-builder = { enable = true; - authorizedKeys.keys = [ - keys.machines.tohru - keys.machines.yevaud - keys.machines.orm - ]; + authorizedKeys.keys = [ keys.machines.tohru ]; + }; + qenya.services.distributed-builds = { + enable = true; + keyFile = "/etc/ssh/ssh_host_ed25519_key"; + builders = [ "kalessin" ]; }; programs.steam.enable = true; diff --git a/hosts/orm/default.nix b/hosts/orm/default.nix index 6af5de3..1d8a648 100644 --- a/hosts/orm/default.nix +++ b/hosts/orm/default.nix @@ -14,12 +14,6 @@ users.users.qenya.extraGroups = [ "wheel" ]; qenya.base-server.enable = true; - qenya.services.distributed-builds = { - enable = true; - keyFile = "/etc/ssh/ssh_host_ed25519_key"; - builders = [ "kalessin" ]; - }; - randomcat.services.zfs.datasets = { "rpool_orm/state" = { mountpoint = "none"; }; "rpool_orm/state/actual" = { mountpoint = "/var/lib/actual"; }; diff --git a/hosts/tohru/default.nix b/hosts/tohru/default.nix index cae91d3..9d5702c 100644 --- a/hosts/tohru/default.nix +++ b/hosts/tohru/default.nix @@ -49,7 +49,7 @@ qenya.services.distributed-builds = { enable = true; keyFile = "/etc/ssh/ssh_host_ed25519_key"; - builders = [ "kalessin" ]; + builders = [ "kilgharrah" "kalessin" ]; }; programs.evolution.enable = true; # not in home-manager yet; not declaratively configurable yet diff --git a/hosts/yevaud/default.nix b/hosts/yevaud/default.nix index aa0a671..2a8fdae 100644 --- a/hosts/yevaud/default.nix +++ b/hosts/yevaud/default.nix @@ -14,12 +14,6 @@ users.users.qenya.extraGroups = [ "wheel" ]; qenya.base-server.enable = true; - qenya.services.distributed-builds = { - enable = true; - keyFile = "/etc/ssh/ssh_host_ed25519_key"; - builders = [ "kalessin" ]; - }; - services.bind = { # enable = true; cacheNetworks = [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ]; diff --git a/services/distributed-builds.nix b/services/distributed-builds.nix index e0bbbbb..09cdd44 100644 --- a/services/distributed-builds.nix +++ b/services/distributed-builds.nix @@ -38,8 +38,17 @@ in hostName = config.birdsong.hosts."kalessin".ipv4; sshUser = "remotebuild"; sshKey = cfg.keyFile; - systems = [ "aarch64-linux" "x86_64-linux" ]; - supportedFeatures = [ ]; + systems = [ "aarch64-linux" ]; + maxJobs = 2; + supportedFeatures = [ "big-parallel" ]; + }) + ++ (optional (elem "kilgharrah" cfg.builders) { + hostName = config.birdsong.hosts."kilgharrah".ipv4; + sshUser = "remotebuild"; + sshKey = cfg.keyFile; + systems = [ "x86_64-linux" ]; + maxJobs = 12; + supportedFeatures = [ "big-parallel" ]; }); }; }