nixos/service.tt-rss: use tt_rss user

- Add tt_rss system user.
- Use tt_rss as the user by default.
- Create tt_rss user and group automatically if used.
This commit is contained in:
Jaakko Luttinen
2018-01-05 14:47:54 +01:00
committed by Robin Gloster
parent c9b46ccea1
commit 13eaae1610
2 changed files with 17 additions and 2 deletions
+15 -2
View File
@@ -99,8 +99,8 @@ let
user = mkOption {
type = types.str;
default = "nginx";
example = "nginx";
default = "tt_rss";
example = "tt_rss";
description = ''
User account under which both the update daemon and the web-application run.
'';
@@ -553,5 +553,18 @@ let
requires = ["${dbService}"];
after = ["network.target" "${dbService}"];
};
users = optionalAttrs (cfg.user == "tt_rss") {
extraUsers = singleton {
name = "tt_rss";
group = "tt_rss";
uid = config.ids.uids.tt_rss;
};
extraGroups = singleton {
name = "tt_rss";
gid = config.ids.gids.tt_rss;
};
};
};
}