Add encrypted munge key with agenix
This commit is contained in:
parent
ec9be9bb62
commit
19a451db77
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
suspendProgram = pkgs.writeScript "suspend.sh" ''
|
suspendProgram = pkgs.writeScript "suspend.sh" ''
|
||||||
@ -85,4 +85,15 @@ in {
|
|||||||
SrunPortRange=60000-61000
|
SrunPortRange=60000-61000
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
age.secrets.mungeKey = {
|
||||||
|
file = ../../secrets/munge-key.age;
|
||||||
|
owner = "munge";
|
||||||
|
group = "munge";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.munge = {
|
||||||
|
enable = true;
|
||||||
|
password = config.age.secrets.mungeKey.path;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
BIN
secrets/munge-key.age
Normal file
BIN
secrets/munge-key.age
Normal file
Binary file not shown.
@ -3,11 +3,12 @@ let
|
|||||||
adminsKeys = builtins.attrValues keys.admins;
|
adminsKeys = builtins.attrValues keys.admins;
|
||||||
hut = [ keys.hosts.hut ] ++ adminsKeys;
|
hut = [ keys.hosts.hut ] ++ adminsKeys;
|
||||||
# Only expose ceph keys to safe nodes and admins
|
# Only expose ceph keys to safe nodes and admins
|
||||||
ceph = keys.hostGroup.safe ++ adminsKeys;
|
safe = keys.hostGroup.safe ++ adminsKeys;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"ovni-token.age".publicKeys = hut;
|
"ovni-token.age".publicKeys = hut;
|
||||||
"nosv-token.age".publicKeys = hut;
|
"nosv-token.age".publicKeys = hut;
|
||||||
|
|
||||||
"ceph-user.age".publicKeys = ceph;
|
"ceph-user.age".publicKeys = safe;
|
||||||
|
"munge-key.age".publicKeys = safe;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user