macs: set hostName and let localHostName inherit
Martin Weinelt committed
Jun 26, 2026 at 22:56 UTC
e8bab5ba4ff8dd5c1e327d9de99613b1ec27ae50
3 files changed
+12
-11
macs/common/ofborg-queue-builder.nix
+3
-3
@@ -21,8 +21,8 @@
21
name = "staging-hydra-ca.crt";
22
};
23
clientCertPath = builtins.path {
24
- path = ../ofborg-ca/client-${config.networking.hostName}.crt;
25
- name = "client-${config.networking.hostName}.crt";
24
+ path = ../ofborg-ca/client-${config.networking.localHostName}.crt;
25
+ name = "client-${config.networking.localHostName}.crt";
26
};
27
clientKeyPath = config.sops.secrets."queue-runner-client.key".path;
28
domainName = "queue-runner.staging-hydra.nixos.org";
@@ -31,7 +31,7 @@
31
32
sops.secrets."queue-runner-client.key" = {
33
owner = "hydra-queue-builder";
34
- sopsFile = ../secrets/${config.networking.hostName}.yml;
34
+ sopsFile = ../secrets/${config.networking.localHostName}.yml;
35
};
36
37
users.users.hydra-queue-builder.home = lib.mkForce "/private/var/lib/hydra-queue-builder";
macs/common/ofborg.nix
+1
-1
@@ -36,6 +36,6 @@
36
37
sops.secrets."ofborg/builder-rabbitmq-password" = {
38
owner = "ofborg";
39
- sopsFile = ../secrets/${config.networking.hostName}.yml;
39
+ sopsFile = ../secrets/${config.networking.localHostName}.yml;
40
};
41
}
macs/flake-module.nix
+8
-7
@@ -15,8 +15,9 @@
15
modules = [
16
{
17
networking = {
18
- # the name used to resolve the flake output
19
- localHostName = hostname;
18
+ # the name as it appears on the terminal and in the queue-runner
19
+ # inherited by `localHostName` for the flake-ref
20
+ hostName = hostname;
21
# the name that propagates into the MDM
22
computerName = hostname;
23
};
@@ -50,19 +51,19 @@
51
nixos-foundation-macstadium-44911305 = mkNixDarwin "mac01.ofborg.org" ./profiles/ofborg-x86_64.nix {
52
system = "x86_64-darwin";
53
extraModules = [
53
- { networking.hostName = "nixos-foundation-macstadium-44911305"; }
54
+ { networking.localHostName = "nixos-foundation-macstadium-44911305"; }
55
];
56
};
57
nixos-foundation-macstadium-44911362 = mkNixDarwin "mac02.ofborg.org" ./profiles/ofborg-x86_64.nix {
58
system = "x86_64-darwin";
59
extraModules = [
59
- { networking.hostName = "nixos-foundation-macstadium-44911362"; }
60
+ { networking.localHostName = "nixos-foundation-macstadium-44911362"; }
61
];
62
};
63
nixos-foundation-macstadium-44911507 = mkNixDarwin "mac03.ofborg.org" ./profiles/ofborg-x86_64.nix {
64
system = "x86_64-darwin";
65
extraModules = [
65
- { networking.hostName = "nixos-foundation-macstadium-44911507"; }
66
+ { networking.localHostName = "nixos-foundation-macstadium-44911507"; }
67
];
68
};
69
@@ -70,7 +71,7 @@
71
nixos-foundation-macstadium-44911207 = mkNixDarwin "mac04.ofborg.org" ./profiles/ofborg-m1.nix {
72
extraModules = [
73
{
73
- networking.hostName = "nixos-foundation-macstadium-44911207";
74
+ networking.localHostName = "nixos-foundation-macstadium-44911207";
75
ids.gids.nixbld = lib.mkForce 350;
76
}
77
];
@@ -78,7 +79,7 @@
79
nixos-foundation-macstadium-44911104 = mkNixDarwin "mac05.ofborg.org" ./profiles/ofborg-m1.nix {
80
extraModules = [
81
{
81
- networking.hostName = "nixos-foundation-macstadium-44911104";
82
+ networking.localHostName = "nixos-foundation-macstadium-44911104";
83
ids.gids.nixbld = lib.mkForce 350;
84
}
85
];