| 1 | { |
| 2 | config, |
| 3 | lib, |
| 4 | pkgs, |
| 5 | ... |
| 6 | }: |
| 7 | |
| 8 | let |
| 9 | environment = lib.concatStringsSep " " [ |
| 10 | "NIX_SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" |
| 11 | ]; |
| 12 | |
| 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 | |
| 23 | users.users.root.openssh.authorizedKeys.keys = |
| 24 | with keys.ssh; |
| 25 | (map authorizedNixStoreKey users.hydra-queue-runner) ++ groups.infra-core; |
| 26 | } |