nixos: static ids for jackett, radarr, sonarr
This commit is contained in:
parent
d25f7c9eed
commit
45470c65f5
@ -289,6 +289,9 @@
|
|||||||
rpc = 271;
|
rpc = 271;
|
||||||
geoip = 272;
|
geoip = 272;
|
||||||
fcron = 273;
|
fcron = 273;
|
||||||
|
sonarr = 274;
|
||||||
|
radarr = 275;
|
||||||
|
jackett = 276;
|
||||||
|
|
||||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||||
|
|
||||||
@ -547,6 +550,9 @@
|
|||||||
#rpc = 271; # unused
|
#rpc = 271; # unused
|
||||||
#geoip = 272; # unused
|
#geoip = 272; # unused
|
||||||
fcron = 273;
|
fcron = 273;
|
||||||
|
sonarr = 274;
|
||||||
|
radarr = 275;
|
||||||
|
jackett = 276;
|
||||||
|
|
||||||
# When adding a gid, make sure it doesn't match an existing
|
# When adding a gid, make sure it doesn't match an existing
|
||||||
# uid. Users and groups with the same name should have equal
|
# uid. Users and groups with the same name should have equal
|
||||||
|
@ -22,14 +22,14 @@ in
|
|||||||
echo "Creating jackett data directory in /var/lib/jackett/"
|
echo "Creating jackett data directory in /var/lib/jackett/"
|
||||||
mkdir -p /var/lib/jackett/
|
mkdir -p /var/lib/jackett/
|
||||||
}
|
}
|
||||||
chown -R jackett /var/lib/jackett/
|
chown -R jackett:jackett /var/lib/jackett/
|
||||||
chmod 0700 /var/lib/jackett/
|
chmod 0700 /var/lib/jackett/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "jackett";
|
User = "jackett";
|
||||||
Group = "nogroup";
|
Group = "jackett";
|
||||||
PermissionsStartOnly = "true";
|
PermissionsStartOnly = "true";
|
||||||
ExecStart = "${pkgs.jackett}/bin/Jackett";
|
ExecStart = "${pkgs.jackett}/bin/Jackett";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
@ -37,8 +37,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.jackett = {
|
users.extraUsers.jackett = {
|
||||||
|
uid = config.ids.uids.jackett;
|
||||||
home = "/var/lib/jackett";
|
home = "/var/lib/jackett";
|
||||||
|
group = "jackett";
|
||||||
};
|
};
|
||||||
|
users.extraGroups.jackett.gid = config.ids.gids.jackett;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,14 @@ in
|
|||||||
echo "Creating radarr data directory in /var/lib/radarr/"
|
echo "Creating radarr data directory in /var/lib/radarr/"
|
||||||
mkdir -p /var/lib/radarr/
|
mkdir -p /var/lib/radarr/
|
||||||
}
|
}
|
||||||
chown -R radarr /var/lib/radarr/
|
chown -R radarr:radarr /var/lib/radarr/
|
||||||
chmod 0700 /var/lib/radarr/
|
chmod 0700 /var/lib/radarr/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "radarr";
|
User = "radarr";
|
||||||
Group = "nogroup";
|
Group = "radarr";
|
||||||
PermissionsStartOnly = "true";
|
PermissionsStartOnly = "true";
|
||||||
ExecStart = "${pkgs.radarr}/bin/Radarr";
|
ExecStart = "${pkgs.radarr}/bin/Radarr";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
@ -37,8 +37,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.radarr = {
|
users.extraUsers.radarr = {
|
||||||
|
uid = config.ids.uids.radarr;
|
||||||
home = "/var/lib/radarr";
|
home = "/var/lib/radarr";
|
||||||
|
group = "radarr";
|
||||||
};
|
};
|
||||||
|
users.extraGroups.radarr.gid = config.ids.gids.radarr;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,14 @@ in
|
|||||||
echo "Creating sonarr data directory in /var/lib/sonarr/"
|
echo "Creating sonarr data directory in /var/lib/sonarr/"
|
||||||
mkdir -p /var/lib/sonarr/
|
mkdir -p /var/lib/sonarr/
|
||||||
}
|
}
|
||||||
chown -R sonarr /var/lib/sonarr/
|
chown -R sonarr:sonarr /var/lib/sonarr/
|
||||||
chmod 0700 /var/lib/sonarr/
|
chmod 0700 /var/lib/sonarr/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "sonarr";
|
User = "sonarr";
|
||||||
Group = "nogroup";
|
Group = "sonarr";
|
||||||
PermissionsStartOnly = "true";
|
PermissionsStartOnly = "true";
|
||||||
ExecStart = "${pkgs.sonarr}/bin/NzbDrone --no-browser";
|
ExecStart = "${pkgs.sonarr}/bin/NzbDrone --no-browser";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
@ -37,8 +37,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.sonarr = {
|
users.extraUsers.sonarr = {
|
||||||
|
uid = config.ids.uids.sonarr;
|
||||||
home = "/var/lib/sonarr";
|
home = "/var/lib/sonarr";
|
||||||
|
group = "sonarr";
|
||||||
};
|
};
|
||||||
|
users.extraGroups.sonarr.gid = config.ids.gids.sonarr;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user