aboutsummaryrefslogtreecommitdiff
path: root/modules/services/openssh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/openssh.nix')
-rw-r--r--modules/services/openssh.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/services/openssh.nix b/modules/services/openssh.nix
new file mode 100644
index 0000000..c6a73cb
--- /dev/null
+++ b/modules/services/openssh.nix
@@ -0,0 +1,17 @@
+{
+ config,
+ username,
+ lib,
+ ...
+}:
+{
+ options.nx.services.openssh.enable = lib.mkEnableOption "Enable openssh service";
+ config = lib.mkIf config.nx.services.openssh.enable {
+ services.openssh = {
+ enable = true;
+ settings = {
+ AllowUsers = [ username ];
+ };
+ };
+ };
+}