Code cleanup.

This commit is contained in:
Kevin Baensch 2019-09-06 11:38:02 +02:00
parent 9b6cea1696
commit 94e969abd9
4 changed files with 10 additions and 13 deletions

View file

@ -16,8 +16,7 @@ mkIf (elem "openssh" config.machine.services) {
passwordAuthentication = false;
permitRootLogin = "no";
extraConfig = let users = concatMapStrings (user: "${user.name} ") config.machine.administrators
+ (if config.services.gitea.enable then (config.services.gitea.user + " ") else "")
+ (if config.services.nix-serve.enable then "nix-ssh" else "");
+ (optionalString config.services.gitea.enable (config.services.gitea.user + " "));
in ''
UsePAM no
AllowUsers ${users}