mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 21:35:37 +00:00
replace activationscripts with systemd
This commit is contained in:
parent
5872abcc33
commit
e309889b0b
@ -20,13 +20,18 @@
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
# Create videos directory, allow anyone in Jellyfin group to manage it
|
# Create videos directory, allow anyone in Jellyfin group to manage it
|
||||||
system.activationScripts.jellyfin = let videosDirectory = "/var/videos";
|
systemd.services.videos-library = {
|
||||||
in {
|
wantedBy = [ "jellyfin.service" ];
|
||||||
text = ''
|
requiredBy = [ "jellyfin.service" ];
|
||||||
if [ ! -d "${videosDirectory}" ]; then
|
before = [ "jellyfin.service" ];
|
||||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG ${videosDirectory}
|
serviceConfig = {
|
||||||
$DRY_RUN_CMD chmod 775 $VERBOSE_ARG ${videosDirectory}
|
Type = "oneshot";
|
||||||
fi
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
script = let videosDirectory = "/var/videos";
|
||||||
|
in ''
|
||||||
|
mkdir --parents --mode 0755 ${videosDirectory}
|
||||||
|
chown jellyfin:jellyfin ${videosDirectory}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
adminpassFile = "/var/lib/nextcloud/creds";
|
adminpassFile = "/var/lib/nextcloud/creds";
|
||||||
backupS3File = "/var/lib/nextcloud/backup-creds";
|
backupS3File = "/var/lib/nextcloud/backup-creds";
|
||||||
|
|
||||||
@ -147,7 +148,7 @@ in {
|
|||||||
before = [ "litestream.service" ];
|
before = [ "litestream.service" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "root";
|
RemainAfterExit = true;
|
||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
echo \
|
echo \
|
||||||
|
Loading…
Reference in New Issue
Block a user