electrs: move user/group definitions to bottom

Consistent with other service defs.
This commit is contained in:
Erik Arvstedt 2020-03-04 18:08:48 +01:00
parent 148327326b
commit acde24ce43
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -57,14 +57,6 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
users.users.${cfg.user} = {
description = "electrs User";
group = cfg.group;
extraGroups = [ "bitcoinrpc" "bitcoin"];
home = cfg.dataDir;
};
users.groups.${cfg.group} = {};
systemd.services.electrs = { systemd.services.electrs = {
description = "Run electrs"; description = "Run electrs";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@ -117,6 +109,15 @@ in {
requires = [ "nix-bitcoin-secrets.target" ]; requires = [ "nix-bitcoin-secrets.target" ];
after = [ "nix-bitcoin-secrets.target" ]; after = [ "nix-bitcoin-secrets.target" ];
}; };
users.users.${cfg.user} = {
description = "electrs User";
group = cfg.group;
extraGroups = [ "bitcoinrpc" "bitcoin"];
home = cfg.dataDir;
};
users.groups.${cfg.group} = {};
nix-bitcoin.secrets = rec { nix-bitcoin.secrets = rec {
nginx-key = { nginx-key = {
user = "nginx"; user = "nginx";