treewide: reformat

This commit is contained in:
Nikodem Rabuliński 2024-03-07 23:10:03 +01:00
parent 8d975c07fa
commit 4eb71e5baf
8 changed files with 63 additions and 73 deletions

View file

@ -22,22 +22,20 @@ let
services.github-runners = lib.pipe cfg.runners [
(lib.mapAttrsToList (
name: cfg:
lib.genList
(
i:
lib.nameValuePair "${name}-${toString i}" {
enable = true;
tokenFile = config.age.secrets.github-token.path;
inherit (cfg) url;
name = "${cfg.name}-${toString i}";
user = github-runner-user;
serviceOverrides = {
DynamicUser = false;
};
extraLabels = [ "nix" ];
}
)
cfg.instances
lib.genList (
i:
lib.nameValuePair "${name}-${toString i}" {
enable = true;
tokenFile = config.age.secrets.github-token.path;
inherit (cfg) url;
name = "${cfg.name}-${toString i}";
user = github-runner-user;
serviceOverrides = {
DynamicUser = false;
};
extraLabels = [ "nix" ];
}
) cfg.instances
))
lib.flatten
lib.listToAttrs

View file

@ -43,8 +43,7 @@ let
let
configName' =
args.configurationName
or (throw "pass configurationName to module arguments or set users.users.${username}.openssh.authorizedKeys yourself"
);
or (throw "pass configurationName to module arguments or set users.users.${username}.openssh.authorizedKeys yourself");
filteredKeys = lib.filterAttrs (name: _: name != configName') cfg.allSshKeys;
in
lib.mkDefault (lib.attrValues filteredKeys);