File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 description = "Whether to enable SABnzbd usenet downloader" ;
3030 } ;
3131
32+ group = mkOption {
33+ type = types . str ;
34+ default = "sabnzbd" ;
35+ description = "Group under which the service runs" ;
36+ } ;
37+
38+ user = mkOption {
39+ type = types . str ;
40+ default = "media" ;
41+ description = "User under which the service runs" ;
42+ } ;
43+
3244 downloadsDir = mkOption {
3345 type = types . str ;
3446 default = "${ nixflix . downloadsDir } /usenet" ;
136148
137149 # Enable sabnzbd service
138150 services . sabnzbd = {
151+ inherit ( cfg ) user group ;
139152 enable = true ;
140- user = "sabnzbd" ;
141- group = "media" ;
142153 configFile = "/var/lib/sabnzbd/sabnzbd.ini" ;
143154 } ;
144155
@@ -158,12 +169,6 @@ in {
158169 export SABNZBD_API_KEY=$(${ pkgs . coreutils } /bin/cat ${ cfg . apiKeyPath } )
159170 '' }
160171
161- # Export environment secrets
162- ${ concatMapStringsSep "\n " ( secret : ''
163- export ${ secret . env } =$(${ pkgs . coreutils } /bin/cat ${ secret . path } )
164- '' )
165- cfg . environmentSecrets }
166-
167172 # Substitute environment variables in template
168173 ${ pkgs . envsubst } /bin/envsubst < /etc/sabnzbd/sabnzbd.ini.template > /var/lib/sabnzbd/sabnzbd.ini
169174
You can’t perform that action at this time.
0 commit comments