diff options
Diffstat (limited to 'nixos/ssh.nix')
-rw-r--r-- | nixos/ssh.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/ssh.nix b/nixos/ssh.nix new file mode 100644 index 0000000..8f81474 --- /dev/null +++ b/nixos/ssh.nix @@ -0,0 +1,16 @@ +{ lib, config, ... }: let + cfg = config.services._ssh; +in { + options.services._ssh = { + enable = lib.mkEnableOption "enable openssh with X11 forwarding"; + }; + + config = lib.mkIf cfg.enable { + services.openssh = { + enable = true; + settings = { + X11Forwarding = true; + }; + }; + }; +} |