Update arr-stack.nix
This commit is contained in:
parent
ad2a276ec7
commit
396a8847c8
1 changed files with 7 additions and 6 deletions
|
|
@ -17,14 +17,14 @@
|
||||||
ExecStart = "${pkgs.qbittorrent-nox}/bin/qbittorrent-nox";
|
ExecStart = "${pkgs.qbittorrent-nox}/bin/qbittorrent-nox";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
||||||
# Security hardening (optional but recommended)
|
# Security hardening
|
||||||
NoNewPrivileges = true;
|
NoNewPrivileges = true;
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
ProtectSystem = "strict";
|
ProtectSystem = "strict";
|
||||||
ProtectHome = "read-only";
|
ProtectHome = true;
|
||||||
ReadWritePaths = [
|
ReadWritePaths = [
|
||||||
"/var/lib/qbittorrent"
|
"/var/lib/qbittorrent"
|
||||||
"/home/fred/storage/torrents"
|
"/mnt/storage/torrents"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -32,13 +32,12 @@
|
||||||
mkdir -p /var/lib/qbittorrent/.config/qBittorrent
|
mkdir -p /var/lib/qbittorrent/.config/qBittorrent
|
||||||
cat > /var/lib/qbittorrent/.config/qBittorrent/qBittorrent.conf << EOF
|
cat > /var/lib/qbittorrent/.config/qBittorrent/qBittorrent.conf << EOF
|
||||||
[Preferences]
|
[Preferences]
|
||||||
Downloads\SavePath=/home/fred/storage/torrents/downloads
|
Downloads\SavePath=/mnt/storage/torrents/downloads
|
||||||
EOF
|
EOF
|
||||||
chown -R qbittorrent:qbittorrent /var/lib/qbittorrent/.config
|
chown -R qbittorrent:qbittorrent /var/lib/qbittorrent/.config
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Create the user and group
|
|
||||||
users.users.qbittorrent = {
|
users.users.qbittorrent = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "qbittorrent";
|
group = "qbittorrent";
|
||||||
|
|
@ -50,7 +49,9 @@
|
||||||
|
|
||||||
# Ensure the download directory exists with proper permissions
|
# Ensure the download directory exists with proper permissions
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /home/fred/storage/torrents/downloads 0775 qbittorrent qbittorrent -"
|
"d /mnt/storage/torrents/downloads 0775 qbittorrent qbittorrent -"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
users.users.fred.extraGroups = [ "qbittorrent" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue