Flake for my NixOS devices
at main 36 lines 881 B view raw
1{...}: { 2 lib, 3 config, 4 ... 5}: { 6 options.cow.ssh-server.enable = lib.mkEnableOption "OpenSSH daemon for accepting connections + customizations. Uses port 8069"; 7 8 config = lib.mkIf config.cow.ssh-server.enable { 9 # For nicer term rendering 10 environment.enableAllTerminfo = true; 11 12 services.openssh = { 13 enable = true; 14 openFirewall = true; 15 banner = let 16 name = lib.toUpper config.networking.hostName; 17 in '' 18 -= ${name} =- 19 20 21 ''; 22 listenAddresses = [ 23 { 24 addr = "0.0.0.0"; 25 } 26 ]; 27 # TODO: Maybe just use 22 like a normal person 28 ports = [8069]; 29 settings.PasswordAuthentication = false; 30 settings.UseDns = false; 31 # settings.LogLevel = "DEBUG1"; 32 settings.PermitRootLogin = "prohibit-password"; 33 settings.KbdInteractiveAuthentication = false; 34 }; 35 }; 36}