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