29 lines
501 B
Nix
29 lines
501 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
config = lib.mkMerge [
|
|
{
|
|
services = {
|
|
openssh = {
|
|
enable = true;
|
|
ports = [22];
|
|
settings = {
|
|
PasswordAuthentication = false;
|
|
UseDns = true;
|
|
X11Forwarding = false;
|
|
};
|
|
};
|
|
};
|
|
}
|
|
(lib.mkIf config.host.impermanence.enable {
|
|
environment.persistence."/persist/system/root" = {
|
|
directories = [
|
|
"/etc/ssh"
|
|
];
|
|
};
|
|
})
|
|
];
|
|
}
|