base: centralize openssh settings

This commit is contained in:
Antoine Martin 2022-11-14 23:46:17 +01:00
parent d8573cad9e
commit 733f46d70a
5 changed files with 10 additions and 14 deletions

View file

@ -8,6 +8,14 @@
bandwhich.enable = true; bandwhich.enable = true;
}; };
services.openssh = {
passwordAuthentication = false;
permitRootLogin = "no";
extraConfig = ''
StreamLocalBindUnlink yes
'';
};
environment.systemPackages = builtins.attrValues { environment.systemPackages = builtins.attrValues {
inherit inherit
(pkgs) (pkgs)

View file

@ -79,11 +79,7 @@
}; };
services = { services = {
openssh = { openssh.enable = true;
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
}; };
my.gui = { my.gui = {
enable = true; enable = true;

View file

@ -126,8 +126,6 @@ in {
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.permitRootLogin = "no";
services.openssh.passwordAuthentication = false;
virtualisation.docker.enable = true; virtualisation.docker.enable = true;

View file

@ -89,8 +89,6 @@ in {
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.permitRootLogin = "no";
services.openssh.passwordAuthentication = false;
# Takes a long while to build # Takes a long while to build
documentation.nixos.enable = false; documentation.nixos.enable = false;

View file

@ -85,11 +85,7 @@
}; };
}; };
fwupd.enable = true; fwupd.enable = true;
openssh = { openssh.enable = true;
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
}; };
my.gui.enable = true; my.gui.enable = true;