Compare commits

...

2 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
419bd8fc12 enable nixos-cuda again 2026-05-03 15:20:33 +02:00
Lennart J. Kurzweg (Nx2)
1b18252813 caldav_event to nextcloud 2026-05-03 15:19:56 +02:00
2 changed files with 9 additions and 7 deletions

View File

@@ -1,6 +1,8 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all; let
username = "lennart";
in {
sops.secrets = { sops.secrets = {
"nx2site/radicale/password" = { }; "nx2site/nextcloud/lennart_pass" = { };
}; };
home.packages = [ home.packages = [
(pkgs.writers.writePython3Bin "caldav_event" { (pkgs.writers.writePython3Bin "caldav_event" {
@@ -90,10 +92,10 @@ def is_too_old(event_dict: dict) -> bool:
return now - last_checked >= timedelta(minutes=10) return now - last_checked >= timedelta(minutes=10)
if __name__ == "__main__": 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 cache_file = "/tmp/caldav_event_cache.json" # Path to cache file
url = "https://dav.${hyper.domain}/" url = "https://n.${hyper.domain}/remote.php/dav/calendars/${username}/"
username = "nx2" username = "${username}"
password = get_password(password_file) password = get_password(password_file)
now = datetime.now(timezone.utc).timestamp() now = datetime.now(timezone.utc).timestamp()

View File

@@ -3,12 +3,12 @@
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
substituters = [ substituters = [
"https://cache.nixos.org/" "https://cache.nixos.org/"
# "https://cache.nixos-cuda.org" "https://cache.nixos-cuda.org"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="
]; ];
}; };
} }