Compare commits
2 Commits
245fdbb60f
...
419bd8fc12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
419bd8fc12 | ||
|
|
1b18252813 |
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user