diff --git a/home-modules/bar/caldav-event.nix b/home-modules/bar/caldav-event.nix index 097fc05..c9e0a0c 100644 --- a/home-modules/bar/caldav-event.nix +++ b/home-modules/bar/caldav-event.nix @@ -1,6 +1,8 @@ -{ pkgs, ... }@all: with all; { +{ pkgs, ... }@all: with all; let + username = "lennart"; +in { sops.secrets = { - "nx2site/radicale/password" = { }; + "nx2site/nextcloud/lennart_pass" = { }; }; home.packages = [ (pkgs.writers.writePython3Bin "caldav_event" { @@ -90,10 +92,10 @@ def is_too_old(event_dict: dict) -> bool: return now - last_checked >= timedelta(minutes=10) if __name__ == "__main__": - password_file = "${config.sops.secrets."nx2site/radicale/password".path}" # Path to password file + password_file = "${config.sops.secrets."nx2site/nextcloud/lennart_pass".path}" # Path to password file cache_file = "/tmp/caldav_event_cache.json" # Path to cache file - url = "https://dav.${hyper.domain}/" - username = "nx2" + url = "https://n.${hyper.domain}/remote.php/dav/calendars/${username}/" + username = "${username}" password = get_password(password_file) now = datetime.now(timezone.utc).timestamp()