mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
lidarr: init at 0.3.1.471
Fork of sonarr (as radarr) but for music instead of series and movies.
This commit is contained in:
parent
18db34f09b
commit
aba95986d2
5 changed files with 87 additions and 0 deletions
46
nixos/modules/services/misc/lidarr.nix
Normal file
46
nixos/modules/services/misc/lidarr.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.lidarr;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.lidarr = {
|
||||
enable = mkEnableOption "Lidarr";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.lidarr = {
|
||||
description = "Lidarr";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
[ ! -d /var/lib/lidarr ] && mkdir -p /var/lib/lidarr
|
||||
chown -R lidarr:lidarr /var/lib/lidarr
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "lidarr";
|
||||
Group = "lidarr";
|
||||
PermissionsStartOnly = "true";
|
||||
ExecStart = "${pkgs.lidarr}/bin/Lidarr";
|
||||
Restart = "on-failure";
|
||||
|
||||
StateDirectory = "/var/lib/lidarr/";
|
||||
StateDirectoryMode = "0770";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.lidarr = {
|
||||
uid = config.ids.uids.lidarr;
|
||||
home = "/var/lib/lidarr";
|
||||
group = "lidarr";
|
||||
};
|
||||
|
||||
users.groups.lidarr.gid = config.ids.gids.lidarr;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue