add fhcalendar download

This commit is contained in:
Kopatz
2024-08-12 23:25:13 +02:00
parent b5af251a0e
commit 668afc76d8
5 changed files with 52 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ in {
# Some default env vars.
env =
[ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" "WLR_NO_HARDWARE_CURSORS,1" ]
// lib.optional osConfig.custom.hardware.nvidia.enable [
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
"LIBVA_DRIVER_NAME,nvidia"
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"

View File

@@ -55,7 +55,7 @@ in
libheif #convert heic to jpg with `heif-convert something.heic something.jpg`
imagemagick #convert images
tree
#kop-newproject # creates a shell.nix and .envrc
kop-newproject # creates a shell.nix and .envrc
nix-tree # show nix derivations
];
};

View File

@@ -27,5 +27,37 @@ in {
medium = [ "/var/lib/radicale/"];
large = [ "/var/lib/radicale/"];
};
systemd.services.kop-fhcalendar = {
description = "Download fh calendar";
wants = [ "network-online.target" ];
after = [ "network.target" "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = let
# stinky
dir = "${config.services.radicale.settings.storage.filesystem_folder}/collection-root/kopatz/b6d2c446-8109-714a-397f-1f35d3136639";
in {
ExecStart = "${pkgs.kop-fhcalendar}/bin/kop-fhcalendar";
WorkingDirectory = dir;
BindPaths = [ "${dir}" ];
User = "radicale";
Restart = "on-failure";
RestartSec = "5s";
PrivateMounts = lib.mkDefault true;
PrivateTmp = lib.mkDefault true;
PrivateUsers = lib.mkDefault true;
ProtectClock = lib.mkDefault true;
ProtectControlGroups = lib.mkDefault true;
ProtectHome = lib.mkDefault true;
ProtectHostname = lib.mkDefault true;
ProtectKernelLogs = lib.mkDefault true;
ProtectKernelModules = lib.mkDefault true;
ProtectKernelTunables = lib.mkDefault true;
ProtectSystem = lib.mkDefault "strict";
# Needs network access
PrivateNetwork = lib.mkDefault false;
};
};
};
}

View File

@@ -6,6 +6,7 @@
kop-monitor = pkgs.callPackage ./kop-monitor/default.nix { };
kop-newproject = pkgs.callPackage ./kop-newproject/default.nix { };
kop-fileshare = pkgs.callPackage ./kop-fileshare/default.nix { };
kop-fhcalendar = pkgs.callPackage ./kop-fhcalendar/default.nix { };
adam-site = pkgs.callPackage ./adam-site/default.nix { };
sddm-astronaut = pkgs.callPackage ./sddm-astronaut/default.nix { };
}

View File

@@ -0,0 +1,17 @@
{ rustPlatform
, lib
, pkgs
, ...
}:
rustPlatform.buildRustPackage {
pname = "kop-fhcalendar";
version = "1.0.0";
src = fetchGit {
url = "git@github.com:kropatz/kop-fhcalendar.git";
ref = "master";
rev = "c765949de30eeea99241e9f2ba4d9b5d30c43a1b";
};
cargoHash = "sha256-IrTBLJ3bAe+xveZa5eEz7K51zsM+EQokQNR//1ZHbBk=";
}