replace name with tsns

This commit is contained in:
Aaron Bieber 2024-08-23 09:10:34 -06:00
parent 11eb7bf37c
commit 337a709244
No known key found for this signature in database

View File

@ -12,11 +12,11 @@ in
services.tsns = { services.tsns = {
package = mkPackageOption pkgs "tsns" { }; package = mkPackageOption pkgs "tsns" { };
enable = lib.mkEnableOption "Enable tsns for ${name}"; enable = lib.mkEnableOption "Enable tsns";
user = mkOption { user = mkOption {
type = with types; oneOf [ str int ]; type = with types; oneOf [ str int ];
default = name; default = "tsns";
description = '' description = ''
The user the service will use. The user the service will use.
''; '';
@ -24,7 +24,7 @@ in
group = mkOption { group = mkOption {
type = with types; oneOf [ str int ]; type = with types; oneOf [ str int ];
default = name; default = "tsns";
description = '' description = ''
The group the service will use. The group the service will use.
''; '';
@ -32,7 +32,7 @@ in
dataDir = mkOption { dataDir = mkOption {
type = types.path; type = types.path;
default = "/var/lib/${name}"; default = "/var/lib/tsns";
description = "Path tsns home directory"; description = "Path tsns home directory";
}; };
}; };
@ -43,7 +43,7 @@ in
users.groups."${cfg.group}" = {}; users.groups."${cfg.group}" = {};
users.users."${cfg.user}" = { users.users."${cfg.user}" = {
description = "System user for tsns instance ${name}"; description = "System user for tsns instance ${cfg.user}";
isSystemUser = true; isSystemUser = true;
group = cfg.group; group = cfg.group;
home = "${cfg.dataDir}"; home = "${cfg.dataDir}";