builders, macs: reference queue-runner ssh key from keys.nix
Martin Weinelt committed
May 14, 2026 at 03:24 UTC
3c5eb82837b3337cee0037c0d9901371d16bf291
2 files changed
+9
-16
builders/common/users.nix
+4
-8
@@ -5,10 +5,6 @@
5
...
6
}:
7
let
8
- sshKeys = {
9
- hydra-queue-runner-rhea = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOdxl6gDS7h3oeBBja2RSBxeS51Kp44av8OAJPPJwuU/ hydra-queue-runner@rhea";
10
- };
11
-
8
authorizedNixStoreKey =
9
key:
10
let
@@ -17,6 +13,8 @@ let
13
];
14
in
15
"command=\"${environment} ${config.nix.package}/bin/nix-store --serve --write\" ${key}";
16
+
17
+ keys = import ../../keys.nix;
18
in
19
20
{
@@ -26,12 +24,10 @@ in
24
build = {
25
isNormalUser = true;
26
uid = 2000;
29
- openssh.authorizedKeys.keys = [
30
- (authorizedNixStoreKey sshKeys.hydra-queue-runner-rhea)
31
- ];
27
+ openssh.authorizedKeys.keys = map authorizedNixStoreKey keys.ssh.users.hydra-queue-runner;
28
};
29
34
- root.openssh.authorizedKeys.keys = (import ../../keys.nix).ssh.groups.infra-core;
30
+ root.openssh.authorizedKeys.keys = keys.ssh.groups.infra-core;
31
};
32
};
33
}
macs/common/ssh.nix
+5
-8
@@ -6,10 +6,6 @@
6
}:
7
8
let
9
- sshKeys = {
10
- hydra-queue-runner = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOdxl6gDS7h3oeBBja2RSBxeS51Kp44av8OAJPPJwuU/ hydra-queue-runner@rhea";
11
- };
12
-
9
environment = lib.concatStringsSep " " [
10
"NIX_SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
11
];
@@ -17,13 +13,14 @@ let
13
authorizedNixStoreKey =
14
key:
15
"command=\"${environment} ${config.nix.package}/bin/nix-store --serve --store daemon --write\" ${key}";
16
+
17
+ keys = import ../../keys.nix;
18
in
19
20
{
21
services.openssh.enable = true;
22
25
- users.users.root.openssh.authorizedKeys.keys = [
26
- (authorizedNixStoreKey sshKeys.hydra-queue-runner)
27
- ]
28
- ++ (import ../keys.nix).ssh.groups.infra-core;
23
+ users.users.root.openssh.authorizedKeys.keys =
24
+ with keys.ssh;
25
+ (map authorizedNixStoreKey users.hydra-queue-runner) ++ groups.infra-core;
26
}