diff --git a/hosts/deploy.nix b/hosts/deploy.nix index 7a5260c..4fab360 100644 --- a/hosts/deploy.nix +++ b/hosts/deploy.nix @@ -6,8 +6,7 @@ inputs: { user = "root"; path = activate.nixos inputs.self.nixosConfigurations.hime; }; - sshOpts = ["-i" "/etc/ssh/ssh_host_ed25519_key"]; sshUser = "root"; }; }; - } \ No newline at end of file +} diff --git a/hosts/hime/default.nix b/hosts/hime/default.nix index 069ff86..0801fb3 100644 --- a/hosts/hime/default.nix +++ b/hosts/hime/default.nix @@ -22,10 +22,6 @@ xkbVariant = ""; }; - services.openssh = { - enable = true; - }; - virtualisation.docker.enable = true; users = { defaultUserShell = pkgs.nushell; diff --git a/hosts/sutakku/default.nix b/hosts/sutakku/default.nix index e263e3d..d56b475 100644 --- a/hosts/sutakku/default.nix +++ b/hosts/sutakku/default.nix @@ -48,5 +48,4 @@ pinentryFlavor = "curses"; }; - services.openssh.enable = true; } diff --git a/modules/default.nix b/modules/default.nix index 16f687d..2702246 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -4,5 +4,6 @@ ./networking.nix ./nix.nix ./system.nix + ./openssh.nix ]; } diff --git a/modules/nix.nix b/modules/nix.nix index e14e359..1cf7879 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -29,7 +29,7 @@ "https://hyprland.cachix.org" "https://cache.nixos.org" ]; - trusted-users = [ "root" "@wheel" ]; + trusted-users = ["root" "@wheel"]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" diff --git a/modules/openssh.nix b/modules/openssh.nix new file mode 100644 index 0000000..b5ca24d --- /dev/null +++ b/modules/openssh.nix @@ -0,0 +1,18 @@ +{...}: { + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + PermitRootLogin = "yes"; + StreamLocalBindUnlink = "yes"; + GatewayPorts = "clientspecified"; + }; + + hostKeys = [ + { + path = "/etc/ssh/ssh_host_ed25519_key"; + type = "ed25519"; + } + ]; + }; +}