Compare commits
7 Commits
1183984bb0
...
nix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c17d56664
|
||
|
|
adff9fcd29 | ||
|
|
649e4033fd | ||
|
|
1b38004e03
|
||
|
|
d8ef4356a0
|
||
|
|
5dd5f2e4e0
|
||
|
|
84e8983974
|
8
nix/configuration/flake.lock
generated
8
nix/configuration/flake.lock
generated
@@ -170,11 +170,11 @@
|
|||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783278211,
|
"lastModified": 1785893798,
|
||||||
"narHash": "sha256-/1u+MIQIge+cNPukQoK4Jp8nLuFZRbx4U+MyyxG0RpM=",
|
"narHash": "sha256-69nKdvM+E/66sj9R2HEK8i0p0TOt/0MSqfXiZjcJ9nI=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "9281ba7e10d362d4edb489d0df0e78936dfe7b58",
|
"rev": "6386febdb81eb1e072ad7cb568019f06618008fe",
|
||||||
"revCount": 32,
|
"revCount": 41,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://code.fizz.buzz/talexander/nix_builder.git"
|
"url": "https://code.fizz.buzz/talexander/nix_builder.git"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
config = {
|
config = {
|
||||||
me.distributed_build.enable = true;
|
me.distributed_build.enable = true;
|
||||||
me.distributed_build.machines.quark = {
|
me.distributed_build.machines.quark = {
|
||||||
enable = false;
|
enable_build = false;
|
||||||
|
enable_substituter = false;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
me.distributed_build.machines.hydra = {
|
me.distributed_build.machines.hydra = {
|
||||||
enable = true;
|
enable_build = false;
|
||||||
|
enable_substituter = true;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,10 +4,19 @@
|
|||||||
config = {
|
config = {
|
||||||
me.distributed_build.enable = true;
|
me.distributed_build.enable = true;
|
||||||
me.distributed_build.machines.quark = {
|
me.distributed_build.machines.quark = {
|
||||||
enable = true;
|
enable_build = false;
|
||||||
|
enable_substituter = false;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
me.distributed_build.machines.hydra = {
|
||||||
|
enable_build = false;
|
||||||
|
enable_substituter = true;
|
||||||
|
additional_config = {
|
||||||
|
speedFactor = 2;
|
||||||
|
};
|
||||||
|
substituter_url = "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=local?root=/.disk/root";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
config = {
|
config = {
|
||||||
me.distributed_build.enable = true;
|
me.distributed_build.enable = true;
|
||||||
me.distributed_build.machines.quark = {
|
me.distributed_build.machines.quark = {
|
||||||
enable = false;
|
enable_build = false;
|
||||||
|
enable_substituter = false;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
me.distributed_build.machines.hydra = {
|
me.distributed_build.machines.hydra = {
|
||||||
enable = true;
|
enable_build = false;
|
||||||
|
enable_substituter = true;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
config = {
|
config = {
|
||||||
me.distributed_build.enable = true;
|
me.distributed_build.enable = true;
|
||||||
me.distributed_build.machines.quark = {
|
me.distributed_build.machines.quark = {
|
||||||
enable = false;
|
enable_build = false;
|
||||||
|
enable_substituter = false;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
me.distributed_build.machines.hydra = {
|
me.distributed_build.machines.hydra = {
|
||||||
enable = true;
|
enable_build = false;
|
||||||
|
enable_substituter = true;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,8 +3,16 @@
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
me.distributed_build.enable = true;
|
me.distributed_build.enable = true;
|
||||||
|
me.distributed_build.machines.quark = {
|
||||||
|
enable_build = false;
|
||||||
|
enable_substituter = false;
|
||||||
|
additional_config = {
|
||||||
|
speedFactor = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
me.distributed_build.machines.hydra = {
|
me.distributed_build.machines.hydra = {
|
||||||
enable = true;
|
enable_build = false;
|
||||||
|
enable_substituter = true;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,10 +4,19 @@
|
|||||||
config = {
|
config = {
|
||||||
me.distributed_build.enable = true;
|
me.distributed_build.enable = true;
|
||||||
me.distributed_build.machines.quark = {
|
me.distributed_build.machines.quark = {
|
||||||
enable = true;
|
enable_build = false;
|
||||||
|
enable_substituter = false;
|
||||||
additional_config = {
|
additional_config = {
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
me.distributed_build.machines.hydra = {
|
||||||
|
enable_build = false;
|
||||||
|
enable_substituter = true;
|
||||||
|
additional_config = {
|
||||||
|
speedFactor = 2;
|
||||||
|
};
|
||||||
|
substituter_url = "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=local?root=/.disk/root";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,14 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
make_machine_config = name: {
|
make_machine_config = name: {
|
||||||
enable = lib.mkOption {
|
enable_build = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to use the ${name} machine during distributed builds.";
|
||||||
|
};
|
||||||
|
|
||||||
|
enable_substituter = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
example = true;
|
||||||
@@ -59,11 +66,30 @@ let
|
|||||||
hostName = lib.mkForce "hydra?remote-store=local?root=/.disk/root";
|
hostName = lib.mkForce "hydra?remote-store=local?root=/.disk/root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
build_machine_list = (
|
||||||
|
map (
|
||||||
|
hostname:
|
||||||
|
(lib.mkIf config.me.distributed_build.machines."${hostname}".enable_build (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
hostName = hostname;
|
||||||
|
sshUser = "nixworker";
|
||||||
|
sshKey = "/persist/manual/ssh/root/keys/id_ed25519";
|
||||||
|
maxJobs = 1;
|
||||||
|
supportedFeatures = all_nixos_configs."${hostname}".config.me.optimizations.system_features;
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
}
|
||||||
|
static_host_configs."${hostname}"
|
||||||
|
config.me.distributed_build.machines."${hostname}".additional_config
|
||||||
|
]
|
||||||
|
))
|
||||||
|
) (builtins.attrNames all_nixos_configs)
|
||||||
|
);
|
||||||
substituters_list = (
|
substituters_list = (
|
||||||
map (
|
map (
|
||||||
hostname:
|
hostname:
|
||||||
(lib.mkIf (
|
(lib.mkIf (
|
||||||
config.me.distributed_build.machines."${hostname}".enable
|
config.me.distributed_build.machines."${hostname}".enable_substituter
|
||||||
&& config.me.distributed_build.machines."${hostname}".substituter_url != null
|
&& config.me.distributed_build.machines."${hostname}".substituter_url != null
|
||||||
) (config.me.distributed_build.machines."${hostname}".substituter_url))
|
) (config.me.distributed_build.machines."${hostname}".substituter_url))
|
||||||
) (builtins.attrNames all_nixos_configs)
|
) (builtins.attrNames all_nixos_configs)
|
||||||
@@ -112,25 +138,7 @@ in
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
nix.buildMachines = (
|
nix.buildMachines = build_machine_list;
|
||||||
map (
|
|
||||||
hostname:
|
|
||||||
(lib.mkIf config.me.distributed_build.machines."${hostname}".enable (
|
|
||||||
lib.mkMerge [
|
|
||||||
{
|
|
||||||
hostName = hostname;
|
|
||||||
sshUser = "nixworker";
|
|
||||||
sshKey = "/persist/manual/ssh/root/keys/id_ed25519";
|
|
||||||
maxJobs = 1;
|
|
||||||
supportedFeatures = all_nixos_configs."${hostname}".config.me.optimizations.system_features;
|
|
||||||
protocol = "ssh-ng";
|
|
||||||
}
|
|
||||||
static_host_configs."${hostname}"
|
|
||||||
config.me.distributed_build.machines."${hostname}".additional_config
|
|
||||||
]
|
|
||||||
))
|
|
||||||
) (builtins.attrNames all_nixos_configs)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
(lib.mkIf has_any_substituters {
|
(lib.mkIf has_any_substituters {
|
||||||
nix.settings.substitute = lib.mkForce true;
|
nix.settings.substitute = lib.mkForce true;
|
||||||
|
|||||||
@@ -83,7 +83,10 @@
|
|||||||
"worker2_update"
|
"worker2_update"
|
||||||
"family_disks"
|
"family_disks"
|
||||||
"family_disks_update"
|
"family_disks_update"
|
||||||
# "nixbsd" # Disabled due to onetbb tests hanging on one-cpu machines.
|
"nixbsd"
|
||||||
|
"nix_builder_develop"
|
||||||
|
"organic_develop"
|
||||||
|
"natter_develop"
|
||||||
];
|
];
|
||||||
build_flags = lib.concatMap (target: [
|
build_flags = lib.concatMap (target: [
|
||||||
"--target"
|
"--target"
|
||||||
|
|||||||
@@ -178,9 +178,30 @@ output_directory = "/home/nixworker/persist/nix_builder"
|
|||||||
update = true
|
update = true
|
||||||
update_branch = "nix_update"
|
update_branch = "nix_update"
|
||||||
|
|
||||||
# [[targets]]
|
[[targets]]
|
||||||
# name = "nixbsd"
|
name = "nixbsd"
|
||||||
# repo = "https://github.com/nixos-bsd/nixbsd.git"
|
repo = "https://github.com/nixos-bsd/nixbsd.git"
|
||||||
# revision = "828ff7a3c4ee91f548de65a963fca40eaedb171c"
|
revision = "2b512eda58e6d77378bd20d6027802b158942e24"
|
||||||
# path = "."
|
path = "."
|
||||||
# attr = "base.vmClosureInfo"
|
attr = "base.vmClosureInfo"
|
||||||
|
|
||||||
|
[[targets]]
|
||||||
|
name = "nix_builder_develop"
|
||||||
|
repo = "https://code.fizz.buzz/talexander/nix_builder.git"
|
||||||
|
branch = "main"
|
||||||
|
path = "."
|
||||||
|
attr = "devShells.x86_64-linux.default"
|
||||||
|
|
||||||
|
[[targets]]
|
||||||
|
name = "organic_develop"
|
||||||
|
repo = "https://code.fizz.buzz/talexander/organic.git"
|
||||||
|
branch = "main"
|
||||||
|
path = "."
|
||||||
|
attr = "devShells.x86_64-linux.default"
|
||||||
|
|
||||||
|
[[targets]]
|
||||||
|
name = "natter_develop"
|
||||||
|
repo = "https://code.fizz.buzz/talexander/natter.git"
|
||||||
|
branch = "main"
|
||||||
|
path = "."
|
||||||
|
attr = "devShells.x86_64-linux.default"
|
||||||
|
|||||||
@@ -68,7 +68,15 @@ in
|
|||||||
10.217.1.1 drmario
|
10.217.1.1 drmario
|
||||||
10.217.2.1 mrmanager
|
10.217.2.1 mrmanager
|
||||||
fdfd:5e8a:ee2d::2:2 mrmanager
|
fdfd:5e8a:ee2d::2:2 mrmanager
|
||||||
|
172.16.16.1 unifi
|
||||||
|
172.16.16.231 plug1
|
||||||
|
172.16.16.232 plug2
|
||||||
|
172.16.16.233 plug3
|
||||||
|
172.16.16.234 plug4
|
||||||
|
172.16.16.235 temperature1
|
||||||
|
172.16.16.236 temperature2
|
||||||
172.16.16.245 turtle
|
172.16.16.245 turtle
|
||||||
|
172.16.16.250 sauna
|
||||||
172.16.16.251 stream
|
172.16.16.251 stream
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,9 @@
|
|||||||
config = lib.mkIf (config.me.wine.enable && config.me.graphical) {
|
config = lib.mkIf (config.me.wine.enable && config.me.graphical) {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# wineWowPackages.stable # supports 32 + 64 bit
|
# wineWowPackages.stable # supports 32 + 64 bit
|
||||||
wineWowPackages.waylandFull # Supports 32 + 64 bit with native wayland support.
|
wineWow64Packages.waylandFull # Supports 32 + 64 bit with native wayland support.
|
||||||
# winetricks
|
# winetricks
|
||||||
|
# lutris
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ let
|
|||||||
username = builtins.readFile "${./secrets/flux-system/registry-credentials/username}";
|
username = builtins.readFile "${./secrets/flux-system/registry-credentials/username}";
|
||||||
password = builtins.readFile "${./secrets/flux-system/registry-credentials/password}";
|
password = builtins.readFile "${./secrets/flux-system/registry-credentials/password}";
|
||||||
email = builtins.readFile "${./secrets/flux-system/registry-credentials/email}";
|
email = builtins.readFile "${./secrets/flux-system/registry-credentials/email}";
|
||||||
|
address = builtins.readFile "${./secrets/flux-system/registry-credentials/address}";
|
||||||
})
|
})
|
||||||
// {
|
// {
|
||||||
# "__annotations" = {
|
# "__annotations" = {
|
||||||
@@ -207,16 +208,21 @@ let
|
|||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
email,
|
email,
|
||||||
|
address,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"__type" = "kubernetes.io/dockerconfigjson";
|
"__type" = "kubernetes.io/dockerconfigjson";
|
||||||
".dockerconfigjson" = builtins.toJSON {
|
".dockerconfigjson" = builtins.toJSON {
|
||||||
|
auths = {
|
||||||
|
"${address}" = {
|
||||||
inherit username password email;
|
inherit username password email;
|
||||||
"auth" = toBase64 "${username}:${password}";
|
"auth" = toBase64 "${username}:${password}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
## dex
|
## dex
|
||||||
get_dex_config =
|
get_dex_config =
|
||||||
client_id:
|
client_id:
|
||||||
|
|||||||
Reference in New Issue
Block a user