summaryrefslogtreecommitdiff
path: root/home-modules/services/vdirsyncer.nix
diff options
context:
space:
mode:
authorJakub Stachurski <j.stachurski@student.utwente.nl>2025-11-19 21:02:52 +0100
committerJakub Stachurski <j.stachurski@student.utwente.nl>2025-11-19 21:02:52 +0100
commit892de67a9f64d0b0cdb023d830a019d8feec0a57 (patch)
tree0c5fd0c60ef93bb5cdc5f83c8cade0c5dddb4899 /home-modules/services/vdirsyncer.nix
parentf5b37610b3835ea26757ef36d554ec598d53100c (diff)
Nix fmt
Diffstat (limited to '')
-rw-r--r--home-modules/services/vdirsyncer.nix43
1 files changed, 25 insertions, 18 deletions
diff --git a/home-modules/services/vdirsyncer.nix b/home-modules/services/vdirsyncer.nix
index c5dd2cc..a849637 100644
--- a/home-modules/services/vdirsyncer.nix
+++ b/home-modules/services/vdirsyncer.nix
@@ -1,29 +1,35 @@
-{pkgs, inputs, config, lib, ...}:
-let
- cfg = config.homesv.vdirsyncer;
-in
-{
+{
+ pkgs,
+ inputs,
+ config,
+ lib,
+ ...
+}:
+let
+ cfg = config.homesv.vdirsyncer;
+in
+{
options.homesv.vdirsyncer = {
- enable = lib.mkEnableOption "Enable syncing via vdirsyncer";
- user = lib.mkOption { default = config.home.username; };
- server = lib.mkOption { default= "https://webdav.wilkuu.xyz/dav.php"; };
+ enable = lib.mkEnableOption "Enable syncing via vdirsyncer";
+ user = lib.mkOption { default = config.home.username; };
+ server = lib.mkOption { default = "https://webdav.wilkuu.xyz/dav.php"; };
};
config = lib.mkIf cfg.enable {
sops.secrets.webdav_uname = {
sopsFile = ../../secrets/secrets.yaml;
- key="${cfg.user}/webdav/username";
- };
+ key = "${cfg.user}/webdav/username";
+ };
sops.secrets.webdav_pass = {
sopsFile = ../../secrets/secrets.yaml;
- key="${cfg.user}/webdav/password";
- };
+ key = "${cfg.user}/webdav/password";
+ };
services.vdirsyncer = {
- enable = true;
+ enable = true;
frequency = "*:0/5"; # About once in 5 minutes
- };
+ };
systemd.user.services.vdirsyncer.unitConfig.After = [ "sops-nix.service" ];
-
+
sops.templates."vdirsyncer_config_${cfg.user}" = {
content = ''
[general]
@@ -67,8 +73,9 @@ in
'';
};
home.file.".config/vdirsyncer/config" = {
- source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."vdirsyncer_config_${cfg.user}".path;
+ source =
+ config.lib.file.mkOutOfStoreSymlink
+ config.sops.templates."vdirsyncer_config_${cfg.user}".path;
};
};
-}
-
+}