split ssh away from nix

This commit is contained in:
jopejoe1 2024-01-11 00:19:11 +01:00
parent 08e8414488
commit dff0d40777
9 changed files with 26 additions and 13 deletions

View file

@ -18,6 +18,7 @@
./plasma/6.nix
./printing
./repo-sync
./ssh
./steam
./users
self.inputs.home-manager.nixosModules.home-manager

View file

@ -59,14 +59,6 @@ in {
};
system.stateVersion = "24.05";
services.openssh = {
enable = true;
banner = "Hackers are in Your System!!!";
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000;
};
}

18
modules/ssh/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ config, lib, pkgs, self, ... }:
let cfg = config.jopejoe1.ssh;
in {
options.jopejoe1.ssh = { enable = lib.mkEnableOption "Enable ssh"; };
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
banner = "Hackers are in Your System!!!";
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
};
}