From acde24ce439efa65e56a1f9581b4263600d9e04d Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 4 Mar 2020 18:08:48 +0100 Subject: [PATCH] electrs: move user/group definitions to bottom Consistent with other service defs. --- modules/electrs.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/electrs.nix b/modules/electrs.nix index 8acab2b..2673e4c 100644 --- a/modules/electrs.nix +++ b/modules/electrs.nix @@ -57,14 +57,6 @@ in { }; 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 = { description = "Run electrs"; wantedBy = [ "multi-user.target" ]; @@ -117,6 +109,15 @@ in { requires = [ "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 { nginx-key = { user = "nginx";