From b416b5859519bf13cdfebbe5a8038d1500a76dd4 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 24 Sep 2022 21:05:19 +0000 Subject: [PATCH] fixup ssh: add autostart option --- modules/services/openssh.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/services/openssh.nix b/modules/services/openssh.nix index 32f2958..3e63bb4 100644 --- a/modules/services/openssh.nix +++ b/modules/services/openssh.nix @@ -45,6 +45,16 @@ in { type = types.bool; default = false; }; + autostart = lib.mkOption { + description = '' + Whether to automatically start the OpenSSH daemon. + + If false, the server has to be manually started using + `supervisorctl`. + ''; + type = types.bool; + default = true; + }; package = lib.mkOption { description = '' The package to use for OpenSSH. @@ -100,6 +110,7 @@ in { }; supervisord.programs.sshd = { + inherit (cfg) autostart; path = [ cfg.package ]; autoRestart = true; script = ''