mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
fixup ssh: add autostart option
This commit is contained in:
parent
f861f458e7
commit
b416b58595
1 changed files with 11 additions and 0 deletions
|
|
@ -45,6 +45,16 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
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 {
|
package = lib.mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
The package to use for OpenSSH.
|
The package to use for OpenSSH.
|
||||||
|
|
@ -100,6 +110,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
supervisord.programs.sshd = {
|
supervisord.programs.sshd = {
|
||||||
|
inherit (cfg) autostart;
|
||||||
path = [ cfg.package ];
|
path = [ cfg.package ];
|
||||||
autoRestart = true;
|
autoRestart = true;
|
||||||
script = ''
|
script = ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue