backwards: Add enable option to syncthing module
This commit is contained in:
@@ -12,6 +12,7 @@ in
|
||||
|
||||
ssh.enable = true;
|
||||
git.enable = true;
|
||||
syncthing.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
{ config, ... }:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
enabled = config.mod.syncthing.enable;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
mod.syncthing = {
|
||||
enable = lib.mkEnableOption "Enable syncthing module";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf enabled {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
@@ -85,4 +95,5 @@
|
||||
"syncthing-key".file = ../../../../secrets/backwards/syncthing-key.age;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user