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.

authored by Jaakko Luttinen and committed by Robin Gloster 13eaae16 c9b46cce

+17 -2
+2
nixos/modules/misc/ids.nix
··· 301 301 pykms = 282; 302 302 kodi = 283; 303 303 restya-board = 284; 304 + tt_rss = 285; 304 305 305 306 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! 306 307 ··· 570 571 pykms = 282; 571 572 kodi = 283; 572 573 restya-board = 284; 574 + tt_rss = 285; 573 575 574 576 # When adding a gid, make sure it doesn't match an existing 575 577 # uid. Users and groups with the same name should have equal
+15 -2
nixos/modules/services/web-apps/tt-rss.nix
··· 99 99 100 100 user = mkOption { 101 101 type = types.str; 102 - default = "nginx"; 103 - example = "nginx"; 102 + default = "tt_rss"; 103 + example = "tt_rss"; 104 104 description = '' 105 105 User account under which both the update daemon and the web-application run. 106 106 ''; ··· 553 553 requires = ["${dbService}"]; 554 554 after = ["network.target" "${dbService}"]; 555 555 }; 556 + 557 + users = optionalAttrs (cfg.user == "tt_rss") { 558 + extraUsers = singleton { 559 + name = "tt_rss"; 560 + group = "tt_rss"; 561 + uid = config.ids.uids.tt_rss; 562 + }; 563 + extraGroups = singleton { 564 + name = "tt_rss"; 565 + gid = config.ids.gids.tt_rss; 566 + }; 567 + }; 568 + 556 569 }; 557 570 }