diff options
author | tv <tv@shackspace.de> | 2015-07-22 19:25:51 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-07-22 19:25:51 +0200 |
commit | 14ac6d3bba12f07bd8aa79221b9c64469fe03046 (patch) | |
tree | d95b3ded9f586e40f4d09abbd3b09aeec73f97ed /3modules/tv/urlwatch.nix | |
parent | cf53d56a92a67d0210d126acb60270ee5a4b4a21 (diff) |
* tv: regen ids
Diffstat (limited to '3modules/tv/urlwatch.nix')
-rw-r--r-- | 3modules/tv/urlwatch.nix | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/3modules/tv/urlwatch.nix b/3modules/tv/urlwatch.nix index 05a0b0faf..a659fc74f 100644 --- a/3modules/tv/urlwatch.nix +++ b/3modules/tv/urlwatch.nix @@ -28,7 +28,7 @@ let }; from = mkOption { type = types.str; - default = "${cfg.user}@${config.networking.hostName}.retiolum"; + default = "${user.name}@${config.networking.hostName}.retiolum"; description = '' Content of the From: header of the generated mails. ''; @@ -54,11 +54,6 @@ let https://nixos.org/channels/nixos-unstable/git-revision ]; }; - user = mkOption { - type = types.str; - default = "urlwatch"; - description = "User under which urlwatch runs."; - }; }; urlsFile = toFile "urls" (concatStringsSep "\n" cfg.urls); @@ -84,7 +79,7 @@ let SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; }; serviceConfig = { - User = cfg.user; + User = user.name; PermissionsStartOnly = "true"; PrivateTmp = "true"; Type = "oneshot"; @@ -94,11 +89,10 @@ let set -euf dataDir=$HOME - user=${escapeShellArg cfg.user} if ! test -e "$dataDir"; then mkdir -m 0700 -p "$dataDir" - chown "$user": "$dataDir" + chown ${user.name}: "$dataDir" fi ''; ExecStart = pkgs.writeScript "urlwatch" '' @@ -108,7 +102,6 @@ let from=${escapeShellArg cfg.from} mailto=${escapeShellArg cfg.mailto} urlsFile=${escapeShellArg urlsFile} - user=${escapeShellArg cfg.user} cd /tmp @@ -130,11 +123,14 @@ let ''; }; }; - users.extraUsers = optionals (cfg.user == "urlwatch") (singleton { - name = "urlwatch"; - uid = 3450919516; # bin/genid urlwatch - }); + users.extraUsers = singleton { + inherit (user) name uid; + }; }; + user = { + name = "urlwatch"; + uid = 3467631196; # genid urlwatch + }; in out |