remove zfs-permissions systemd service and associated permission settings

This commit is contained in:
Menno van Leeuwen 2024-11-15 22:25:43 +01:00
parent 8fde290f40
commit e546ecea9a
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -28,70 +28,6 @@
# If you want to keep compression settings # If you want to keep compression settings
boot.kernelParams = [ "zfs.zfs_compressed_arc_enabled=1" ]; boot.kernelParams = [ "zfs.zfs_compressed_arc_enabled=1" ];
systemd.services.zfs-permissions = {
description = "Set correct permissions on ZFS datasets";
after = [ "zfs-mount.service" ];
wantedBy = [ "multi-user.target" ];
script = ''
# Set ownership and permissions for each dataset
# Astrophotography - menno:users 770
chown menno:users /mnt/astrophotography
chmod 770 /mnt/astrophotography
# docker - root:users 775
chown root:users /mnt/docker
chmod 775 /mnt/docker
# ai - menno:users 770
chown menno:users /mnt/ai
chmod 770 /mnt/ai
# Audiobooks - menno:users 760
chown menno:users /mnt/audiobooks
chmod 760 /mnt/audiobooks
# Downloads - menno:users 760
chown menno:users /mnt/downloads
chmod 760 /mnt/downloads
# ISOs - menno:libvirt 777
chown menno:libvirt /mnt/ISOs
chmod 777 /mnt/ISOs
# VMs - menno:libvirt 777
chown menno:libvirt /mnt/VMs
chmod 777 /mnt/VMs
# Movies - menno:users 760
chown menno:users /mnt/movies
chmod 760 /mnt/movies
# Music - menno:users 760
chown menno:users /mnt/music
chmod 760 /mnt/music
# old_backups - menno:users 760
chown menno:users /mnt/old_backups
chmod 760 /mnt/old_backups
# Photos - menno:users 775
chown menno:users /mnt/photos
chmod 775 /mnt/photos
# Stash - menno:users 775
chown menno:users /mnt/stash
chmod 775 /mnt/stash
# TV_Shows - menno:users 760
chown menno:users /mnt/tvshows
chmod 760 /mnt/tvshows
'';
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
};
# TODO: Enable this when we're ready to do so # TODO: Enable this when we're ready to do so
# environment.etc."local/bin/zfs-backup.sh" = { # environment.etc."local/bin/zfs-backup.sh" = {
# mode = "0755"; # mode = "0755";