Modularize stuff better
This commit is contained in:
parent
5b92ddde89
commit
d427be6e4a
20 changed files with 417 additions and 321 deletions
|
@ -1,8 +1,18 @@
|
|||
{config, ...}: {
|
||||
services.syncthing.enable = true;
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.pim.syncthing;
|
||||
in {
|
||||
options.pim.syncthing.enable = lib.mkEnableOption "syncthing";
|
||||
|
||||
sops.secrets = {
|
||||
"syncthing/key".path = "${config.xdg.configHome}/syncthing/key.pem";
|
||||
"syncthing/cert".path = "${config.xdg.configHome}/syncthing/cert.pem";
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.syncthing.enable = true;
|
||||
|
||||
sops.secrets = {
|
||||
"syncthing/key".path = "${config.xdg.configHome}/syncthing/key.pem";
|
||||
"syncthing/cert".path = "${config.xdg.configHome}/syncthing/cert.pem";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue