fix service

This commit is contained in:
Kopatz
2024-08-13 10:54:27 +02:00
parent 10a3a5e9ed
commit 8df7c8ef91
2 changed files with 16 additions and 16 deletions

View File

@@ -23,22 +23,26 @@ in {
};
};
custom.misc.backup = lib.mkIf config.custom.misc.backup.enable {
small = [ "/var/lib/radicale/"];
medium = [ "/var/lib/radicale/"];
large = [ "/var/lib/radicale/"];
small = [ "/var/lib/radicale/" ];
medium = [ "/var/lib/radicale/" ];
large = [ "/var/lib/radicale/" ];
};
systemd.services.kop-fhcalendar = {
systemd.services.kop-fhcalendar = let
radicale = builtins.elemAt
config.services.radicale.settings.storage.filesystem_folder 0;
# not reproducible
working =
"${radicale}/collection-root/kopatz/b6d2c446-8109-714a-397f-1f35d3136639";
in {
description = "Download fh calendar";
wants = [ "network-online.target" ];
after = [ "network.target" "network-online.target" ];
wantedBy = [ "multi-user.target" ];
startAt = "*-*-* 06:00:00";
serviceConfig = let
# stinky
radicale = builtins.elemAt config.services.radicale.settings.storage.filesystem_folder 0;
working = "${radicale}/collection-root/kopatz/b6d2c446-8109-714a-397f-1f35d3136639";
in {
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.kop-fhcalendar}/bin/kop-fhcalendar";
WorkingDirectory = working;
BindPaths = [ working ];

View File

@@ -1,8 +1,4 @@
{ rustPlatform
, lib
, pkgs
, ...
}:
{ rustPlatform, lib, pkgs, ... }:
rustPlatform.buildRustPackage {
pname = "kop-fhcalendar";
version = "1.0.0";
@@ -10,8 +6,8 @@ rustPlatform.buildRustPackage {
src = fetchGit {
url = "git@github.com:kropatz/kop-fhcalendar.git";
ref = "master";
rev = "c765949de30eeea99241e9f2ba4d9b5d30c43a1b";
rev = "d1f1eca9b38a47cee18023440fefde7e3e01ccc4";
};
cargoHash = "sha256-IrTBLJ3bAe+xveZa5eEz7K51zsM+EQokQNR//1ZHbBk=";
cargoHash = "sha256-yx71/6UqD5RDsISeXhQj/zuyLW2Eit32pHYyZBExauE=";
}