main
nix 33 lines 658 Bytes
Raw
1 {
2 config,
3 lib,
4 pkgs,
5 ...
6 }:
7 let
8 authorizedNixStoreKey =
9 key:
10 let
11 environment = lib.concatStringsSep " " [
12 "NIX_SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
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 {
21 users = {
22 mutableUsers = false;
23 users = {
24 build = {
25 isNormalUser = true;
26 uid = 2000;
27 openssh.authorizedKeys.keys = map authorizedNixStoreKey keys.ssh.users.hydra-queue-runner;
28 };
29
30 root.openssh.authorizedKeys.keys = keys.ssh.groups.infra-core;
31 };
32 };
33 }