diff options
author | Alex Guzman <alex@guzman.io> | 2019-08-07 12:27:52 -0700 |
---|---|---|
committer | Alex Guzman <alex@guzman.io> | 2019-08-07 12:27:52 -0700 |
commit | 62d242d1cdc086a04eb4da6c973a3e8e15c370aa (patch) | |
tree | 9b27b6cff93f13fa2f7be8842f1c053b8ecaca8d /nixos/modules/services/audio/roon-server.nix | |
parent | 8becc897ea85bcd9e7c6a2953899ed863b4990fd (diff) | |
download | nixpkgs-62d242d1cdc086a04eb4da6c973a3e8e15c370aa.tar nixpkgs-62d242d1cdc086a04eb4da6c973a3e8e15c370aa.tar.gz nixpkgs-62d242d1cdc086a04eb4da6c973a3e8e15c370aa.tar.bz2 nixpkgs-62d242d1cdc086a04eb4da6c973a3e8e15c370aa.tar.lz nixpkgs-62d242d1cdc086a04eb4da6c973a3e8e15c370aa.tar.xz nixpkgs-62d242d1cdc086a04eb4da6c973a3e8e15c370aa.tar.zst nixpkgs-62d242d1cdc086a04eb4da6c973a3e8e15c370aa.zip |
roon-server: Add actual user piping
Adds defined IDs
Diffstat (limited to 'nixos/modules/services/audio/roon-server.nix')
-rw-r--r-- | nixos/modules/services/audio/roon-server.nix | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/nixos/modules/services/audio/roon-server.nix b/nixos/modules/services/audio/roon-server.nix index a1683a24c10..81980c8f6b2 100644 --- a/nixos/modules/services/audio/roon-server.nix +++ b/nixos/modules/services/audio/roon-server.nix @@ -19,6 +19,20 @@ in { TCP: 9100 - 9200 ''; }; + user = mkOption { + type = types.string; + default = "roon-server"; + description = '' + User to run the Roon Server as. + ''; + }; + group = mkOption { + type = types.string; + default = "roon-server"; + description = '' + Group to run the Roon Server as. + ''; + }; }; }; @@ -33,7 +47,7 @@ in { serviceConfig = { ExecStart = "${pkgs.roon-server}/opt/start.sh"; LimitNOFILE = 8192; - SupplementaryGroups = "audio"; + User = cfg.user; }; }; @@ -43,5 +57,16 @@ in { ]; allowedUDPPorts = [ 9003 ]; }; + + users.groups = singleton { + name = cfg.group; + gid = config.ids.gids.roon-server; + }; + users.users = singleton { + name = cfg.user; + description = "Roon Server user"; + uid = config.ids.uids.roon-server; + groups = [ cfg.group "audio" ]; + }; }; } |