Move more data into metadata
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
|
||||
darwinConfigurations = (import ./darwin { inherit top overlays; });
|
||||
|
||||
nixosConfigurations = (import ./hosts { inherit top overlays; });
|
||||
nixosConfigurations = (import ./hosts { inherit top overlays metadata; });
|
||||
|
||||
homeConfigurations = (import ./home { inherit top overlays; });
|
||||
|
||||
|
||||
@@ -2,18 +2,8 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
let
|
||||
builderHosts =
|
||||
if self != null then
|
||||
(lib.attrNames (
|
||||
lib.filterAttrs (_: v: v.config.greg.remote-builder.enable) self.nixosConfigurations
|
||||
))
|
||||
else
|
||||
[ ];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../modules/nix-conf.nix
|
||||
@@ -76,14 +66,6 @@ in
|
||||
};
|
||||
|
||||
ssh = {
|
||||
extraConfig = builtins.concatStringsSep "\n" (
|
||||
lib.map (x: ''
|
||||
Host ${x}-builder
|
||||
Hostname ${x}.home
|
||||
User remote-builder-user
|
||||
'') builderHosts
|
||||
);
|
||||
|
||||
knownHosts = {
|
||||
chronicles = {
|
||||
extraHostNames = [
|
||||
|
||||
+6
-3
@@ -1,4 +1,8 @@
|
||||
{ top, overlays }:
|
||||
{
|
||||
top,
|
||||
overlays,
|
||||
metadata,
|
||||
}:
|
||||
let
|
||||
vm = args: (unstable (args // { extraMods = [ top.nixos-generators.nixosModules.all-formats ]; }));
|
||||
wsl = args: (unstable (args // { extraMods = [ top.wsl.nixosModules.wsl ]; }));
|
||||
@@ -12,8 +16,7 @@ let
|
||||
}:
|
||||
channel.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit top;
|
||||
inherit (top) self;
|
||||
inherit metadata top;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
metadata,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
builderHosts = lib.filterAttrs (_n: v: (builtins.hasAttr "builder" v) && v.builder) metadata.hosts;
|
||||
cfg = config.greg.nix;
|
||||
in
|
||||
{
|
||||
@@ -17,7 +19,20 @@ in
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.ssh.extraConfig = builtins.concatStringsSep "\n" (
|
||||
lib.map (x: ''
|
||||
Host ${x}-builder
|
||||
Hostname ${x}.shire-zebra.ts.net
|
||||
User remote-builder-user
|
||||
'') (lib.attrNames builderHosts)
|
||||
);
|
||||
|
||||
nix = {
|
||||
buildMachines = lib.mapAttrsToList (k: v: {
|
||||
inherit (v) systems;
|
||||
hostName = "${k}.shire-zebra.ts.net";
|
||||
}) builderHosts;
|
||||
distributedBuilds = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
# Scheduling of them is different in nixos vs nix-darwin, so check for
|
||||
|
||||
+22
-8
@@ -12,39 +12,53 @@
|
||||
},
|
||||
"exodus": {
|
||||
"ip": null,
|
||||
"ts": "100.80.99.48"
|
||||
"ts": "100.80.99.48",
|
||||
"system": "x86_64-linux"
|
||||
},
|
||||
"genesis": {
|
||||
"ip": "10.42.1.5",
|
||||
"ts": "100.88.91.27"
|
||||
"ts": "100.88.91.27",
|
||||
"system": "x86_64-linux"
|
||||
},
|
||||
"hosea": {
|
||||
"ip": "10.42.1.7",
|
||||
"ts": "100.68.203.1"
|
||||
"ts": "100.68.203.1",
|
||||
"system": "x86_64-linux"
|
||||
},
|
||||
"isaiah": {
|
||||
"builder": true,
|
||||
"ip": "10.42.1.6",
|
||||
"ts": "100.84.183.79"
|
||||
"ts": "100.84.183.79",
|
||||
"system": "x86_64-linux",
|
||||
"systems": [ "x86_64-linux", "aarch64-linux" ]
|
||||
},
|
||||
"jeremiah": {
|
||||
"builder": true,
|
||||
"ip": "10.42.1.8",
|
||||
"ts": "100.102.186.39"
|
||||
"ts": "100.102.186.39",
|
||||
"system": "x86_64-linux",
|
||||
"systems": [ "x86_64-linux", "aarch64-linux" ]
|
||||
},
|
||||
"joel": {
|
||||
"ip": "10.42.0.4",
|
||||
"ts": null
|
||||
"ts": null,
|
||||
"system": "x86_64-linux"
|
||||
},
|
||||
"linode": {
|
||||
"ip": null,
|
||||
"ts": "100.109.86.8"
|
||||
"ts": "100.109.86.8",
|
||||
"system": "x86_64-linux"
|
||||
},
|
||||
"nas1": {
|
||||
"ip": "10.42.1.14",
|
||||
"ts": "100.114.187.61"
|
||||
},
|
||||
"zeke": {
|
||||
"builder": true,
|
||||
"ip": "10.42.1.13",
|
||||
"ts": "100.90.74.19"
|
||||
"ts": "100.90.74.19",
|
||||
"system": "x86_64-linux",
|
||||
"systems": [ "x86_64-linux", "aarch64-linux" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user