From 9248259708bd6ade5e334a2cdfb29d2a20acb0dd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 3 Oct 2022 17:15:36 +0200 Subject: ... --- system-profiles/build-server/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'system-profiles/build-server') 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 @@ -{ customUtils, flake, config, lib, ... }: +{ customUtils, flake, config, lib, pkgs, ... }: -{ +with lib; + +let + disallowedSystems = ["armv5tel-linux" config.nixpkgs.system] ++ optional (systems.elaborate config.nixpkgs.system).isx86_64 "i686-linux"; +in { imports = with flake.nixosModules.systemProfiles; [ openssh ]; - + config = { users.groups.nix-ssh-builder = {}; users.users.nix-ssh-builder = { @@ -30,8 +34,10 @@ users.users.nix-ssh-builder.openssh.authorizedKeys.keys = let - 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)); + importKeys = dir: attrValues (customUtils.mapFilterAttrs (_: v: v != null) (n: v: nameValuePair n (if v == "directory" then importKeys' dir n else null)) (builtins.readDir dir)); importKeys' = dir: host: builtins.readFile (dir + "/${host}/public"); in importKeys ./clients; + + boot.binfmt.emulatedSystems = mkDefault (filter (system: (systems.elaborate system).emulatorAvailable pkgs && !(elem system disallowedSystems)) systems.flakeExposed); }; } -- cgit v1.2.3