backwards: Add enable option to syncthing module

This commit is contained in:
Alexander Heldt
2024-08-31 12:45:52 +02:00
parent 0a43eed112
commit 9b98cdfe38
2 changed files with 73 additions and 61 deletions

View File

@@ -12,6 +12,7 @@ in
ssh.enable = true;
git.enable = true;
syncthing.enable = true;
};
};
}

View File

@@ -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;
};
};
};
}