summaryrefslogtreecommitdiff
path: root/system-profiles/build-server
diff options
context:
space:
mode:
Diffstat (limited to 'system-profiles/build-server')
-rw-r--r--system-profiles/build-server/default.nix14
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{ 3with lib;
4
5let
6 disallowedSystems = ["armv5tel-linux" config.nixpkgs.system] ++ optional (systems.elaborate config.nixpkgs.system).isx86_64 "i686-linux";
7in {
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}