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 ++++++++++---- system-profiles/openssh/default.nix | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'system-profiles') 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); }; } diff --git a/system-profiles/openssh/default.nix b/system-profiles/openssh/default.nix index 47908682..3d04d9b5 100644 --- a/system-profiles/openssh/default.nix +++ b/system-profiles/openssh/default.nix @@ -88,7 +88,7 @@ in { }; environment.systemPackages = mkIf cfg.enable (with pkgs; [ - rxvt_unicode.terminfo alacritty.terminfo + alacritty.terminfo ]); }; } -- cgit v1.2.3