diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 260f06c..70cbce7 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -92,9 +92,6 @@ }; }; - # Enable the OpenSSH daemon. - services.openssh.enable = true; - # Nix extra options nix.extraOptions = '' experimental-features = nix-command flakes diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 8d8ea4d..6e4f213 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -12,6 +12,7 @@ ./networking ./packages ./sound + ./ssh ./virtualisation ]; } diff --git a/modules/nixos/ssh/default.nix b/modules/nixos/ssh/default.nix new file mode 100644 index 0000000..c291300 --- /dev/null +++ b/modules/nixos/ssh/default.nix @@ -0,0 +1,12 @@ +{ + config, + lib, + ... +}: { + options = { + ssh.enable = lib.mkEnableOption "enable ssh"; + }; + config = lib.mkIf config.ssh.enable { + services.openssh.enable = true; + }; +}