From 8faa8c71973c32757948ecede0ab2b61891dce37 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Fri, 1 Mar 2024 14:02:06 +0100 Subject: [PATCH] Enable sshd for vbox host --- hosts/default.nix | 6 +++++- modules/services/ssh.nix | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 modules/services/ssh.nix diff --git a/hosts/default.nix b/hosts/default.nix index dc46717..f8a2f84 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -3,6 +3,10 @@ in { vboxnix = lib.nixosSystem { system = "x86_64-linux"; - modules = [ ../system ./vbox_nix ]; + modules = [ + ../system + ./vbox_nix + ../modules/services/ssh.nix + ]; }; } diff --git a/modules/services/ssh.nix b/modules/services/ssh.nix new file mode 100644 index 0000000..d26ec8b --- /dev/null +++ b/modules/services/ssh.nix @@ -0,0 +1,10 @@ +{...}: { + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "prohibit-password"; + PasswordAuthentication = false; + X11Forwarding = false; + }; + }; +}