modules: use user & group options

I've tried my best to locate all uses of hardcoded usernames, but its
not guaranteed that all have been found/fixed.
This commit is contained in:
nixbitcoin 2021-02-16 16:52:45 +00:00
parent ccef870b74
commit e873326bfe
No known key found for this signature in database
GPG key ID: DD11F9AD5308B3BA
7 changed files with 16 additions and 16 deletions

View file

@ -218,7 +218,7 @@ in {
users.groups.${cfg.nbxplorer.group} = {};
users.users.${cfg.btcpayserver.user} = {
group = cfg.btcpayserver.group;
extraGroups = [ "nbxplorer" ]
extraGroups = [ cfg.nbxplorer.group ]
++ optional (cfg.btcpayserver.lightningBackend == "clightning") cfg.clightning.user;
home = cfg.btcpayserver.dataDir;
};
@ -226,10 +226,10 @@ in {
nix-bitcoin.secrets = {
bitcoin-rpcpassword-btcpayserver = {
user = "bitcoin";
group = "nbxplorer";
user = cfg.bitcoind.user;
group = cfg.nbxplorer.group;
};
bitcoin-HMAC-btcpayserver.user = "bitcoin";
bitcoin-HMAC-btcpayserver.user = cfg.bitcoind.user;
};
};
}