simplify user and group definitions

This commit is contained in:
Erik Arvstedt 2019-11-27 14:04:15 +01:00
parent 6c69eb8576
commit d61b185c3a
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
6 changed files with 7 additions and 23 deletions

View File

@ -295,14 +295,11 @@ in {
};
users.users.${cfg.user} = {
name = cfg.user;
group = cfg.group;
extraGroups = [ "keys" ];
description = "Bitcoin daemon user";
home = cfg.dataDir;
};
users.groups.${cfg.group} = {
name = cfg.group;
};
users.groups.${cfg.group} = {};
};
}

View File

@ -67,9 +67,7 @@ in {
extraGroups = [ "bitcoinrpc" "keys" ];
home = cfg.dataDir;
};
users.groups.clightning = {
name = "clightning";
};
users.groups.clightning = {};
systemd.services.clightning = {
description = "Run clightningd";

View File

@ -58,15 +58,12 @@ in {
config = mkIf cfg.enable {
users.users.${cfg.user} = {
name = cfg.user;
description = "electrs User";
group = cfg.group;
extraGroups = [ "bitcoinrpc" "keys" "bitcoin"];
home = cfg.dataDir;
};
users.groups.electrs = {
name = cfg.group;
};
users.groups.${cfg.group} = {};
systemd.services.electrs = {
description = "Run electrs";

View File

@ -214,14 +214,11 @@ in {
);
};
users.users.${cfg.user} = {
name = cfg.user;
group = cfg.group;
extraGroups = [ "keys" ];
description = "Liquid sidechain user";
home = cfg.dataDir;
};
users.groups.${cfg.group} = {
name = cfg.group;
};
users.groups.${cfg.group} = {};
};
}

View File

@ -98,9 +98,7 @@ in {
extraGroups = [ "bitcoinrpc" "keys" ];
home = cfg.dataDir;
};
users.groups.lnd = {
name = "lnd";
};
users.groups.lnd = {};
systemd.services.lnd = {
description = "Run LND";

View File

@ -52,15 +52,12 @@ in {
};
config = mkIf cfg.enable {
users.users.nanopos =
{
users.users.nanopos = {
description = "nanopos User";
group = "nanopos";
extraGroups = [ "keys" ];
};
users.groups.nanopos = {
name = "nanopos";
};
users.groups.nanopos = {};
systemd.services.nanopos = {
description = "Run nanopos";