europa/stan: make peerix private key owner dynamic
This commit is contained in:
parent
61913c8182
commit
9217f91383
@ -1,5 +1,10 @@
|
||||
{ config, pkgs, lib, modulesPath, ... }:
|
||||
let myEmacs = pkgs.callPackage ../../configs/emacs.nix { };
|
||||
let
|
||||
myEmacs = pkgs.callPackage ../../configs/emacs.nix { };
|
||||
peerixUser = if builtins.hasAttr "peerix" config.users.users then
|
||||
config.users.users.peerix.name
|
||||
else
|
||||
"root";
|
||||
in {
|
||||
_module.args.isUnstable = true;
|
||||
|
||||
@ -31,7 +36,7 @@ in {
|
||||
};
|
||||
peerix_private_key = {
|
||||
sopsFile = config.xin-secrets.europa.peerix;
|
||||
owner = "peerix";
|
||||
owner = "${peerixUser}";
|
||||
group = "wheel";
|
||||
mode = "400";
|
||||
};
|
||||
|
@ -7,6 +7,10 @@ let
|
||||
|
||||
userBase = { openssh.authorizedKeys.keys = pubKeys; };
|
||||
myEmacs = pkgs.callPackage ../../configs/emacs.nix { };
|
||||
peerixUser = if builtins.hasAttr "peerix" config.users.users then
|
||||
config.users.users.peerix.name
|
||||
else
|
||||
"root";
|
||||
in {
|
||||
_module.args.isUnstable = true;
|
||||
imports = [ ./hardware-configuration.nix ../../overlays/default.nix ];
|
||||
@ -62,8 +66,8 @@ in {
|
||||
};
|
||||
peerix_private_key = {
|
||||
sopsFile = config.xin-secrets.stan.peerix;
|
||||
owner = "peerix";
|
||||
group = "peerix";
|
||||
owner = "${peerixUser}";
|
||||
group = "wheel";
|
||||
mode = "400";
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user