diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-10-03 17:15:36 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-10-03 17:15:36 +0200 |
commit | 9248259708bd6ade5e334a2cdfb29d2a20acb0dd (patch) | |
tree | 976a140d547557c8cdf98856510030fd35b83d1a /system-profiles/build-server | |
parent | 59e54bd97f70711573d321f2d2aeee5da46bf95d (diff) | |
download | nixos-9248259708bd6ade5e334a2cdfb29d2a20acb0dd.tar nixos-9248259708bd6ade5e334a2cdfb29d2a20acb0dd.tar.gz nixos-9248259708bd6ade5e334a2cdfb29d2a20acb0dd.tar.bz2 nixos-9248259708bd6ade5e334a2cdfb29d2a20acb0dd.tar.xz nixos-9248259708bd6ade5e334a2cdfb29d2a20acb0dd.zip |
...
Diffstat (limited to 'system-profiles/build-server')
-rw-r--r-- | system-profiles/build-server/default.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/system-profiles/build-server/default.nix b/system-profiles/build-server/default.nix index 20b23a31..ee99e02f 100644 --- a/system-profiles/build-server/default.nix +++ b/system-profiles/build-server/default.nix | |||
@@ -1,8 +1,12 @@ | |||
1 | { customUtils, flake, config, lib, ... }: | 1 | { customUtils, flake, config, lib, pkgs, ... }: |
2 | 2 | ||
3 | { | 3 | with lib; |
4 | |||
5 | let | ||
6 | disallowedSystems = ["armv5tel-linux" config.nixpkgs.system] ++ optional (systems.elaborate config.nixpkgs.system).isx86_64 "i686-linux"; | ||
7 | in { | ||
4 | imports = with flake.nixosModules.systemProfiles; [ openssh ]; | 8 | imports = with flake.nixosModules.systemProfiles; [ openssh ]; |
5 | 9 | ||
6 | config = { | 10 | config = { |
7 | users.groups.nix-ssh-builder = {}; | 11 | users.groups.nix-ssh-builder = {}; |
8 | users.users.nix-ssh-builder = { | 12 | users.users.nix-ssh-builder = { |
@@ -30,8 +34,10 @@ | |||
30 | 34 | ||
31 | users.users.nix-ssh-builder.openssh.authorizedKeys.keys = | 35 | users.users.nix-ssh-builder.openssh.authorizedKeys.keys = |
32 | let | 36 | let |
33 | importKeys = dir: lib.attrValues (customUtils.mapFilterAttrs (_: v: v != null) (n: v: lib.nameValuePair n (if v == "directory" then importKeys' dir n else null)) (builtins.readDir dir)); | 37 | importKeys = dir: attrValues (customUtils.mapFilterAttrs (_: v: v != null) (n: v: nameValuePair n (if v == "directory" then importKeys' dir n else null)) (builtins.readDir dir)); |
34 | importKeys' = dir: host: builtins.readFile (dir + "/${host}/public"); | 38 | importKeys' = dir: host: builtins.readFile (dir + "/${host}/public"); |
35 | in importKeys ./clients; | 39 | in importKeys ./clients; |
40 | |||
41 | boot.binfmt.emulatedSystems = mkDefault (filter (system: (systems.elaborate system).emulatorAvailable pkgs && !(elem system disallowedSystems)) systems.flakeExposed); | ||
36 | }; | 42 | }; |
37 | } | 43 | } |