secrets: move into 'modules'
This commit is contained in:
parent
c32be8ac02
commit
0b580b61e7
30 changed files with 1 additions and 2 deletions
BIN
modules/secrets/sso/ambroisie/password-hash.age
Normal file
BIN
modules/secrets/sso/ambroisie/password-hash.age
Normal file
Binary file not shown.
BIN
modules/secrets/sso/ambroisie/totp-secret.age
Normal file
BIN
modules/secrets/sso/ambroisie/totp-secret.age
Normal file
Binary file not shown.
BIN
modules/secrets/sso/auth-key.age
Normal file
BIN
modules/secrets/sso/auth-key.age
Normal file
Binary file not shown.
21
modules/secrets/sso/default.nix
Normal file
21
modules/secrets/sso/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib }:
|
||||
let
|
||||
inherit (lib) fileContents;
|
||||
importUser = (user: {
|
||||
# bcrypt hashed: `htpasswd -BnC 10 ""`
|
||||
passwordHash = fileContents (./. + "/${user}/password-hash.txt");
|
||||
# base32 encoded: `printf '<secret>' | base32 | tr -d =`
|
||||
totpSecret = fileContents (./. + "/${user}/totp-secret.txt");
|
||||
});
|
||||
in
|
||||
{
|
||||
auth_key = fileContents ./auth-key.txt;
|
||||
|
||||
users = lib.flip lib.genAttrs importUser [
|
||||
"ambroisie"
|
||||
];
|
||||
|
||||
groups = {
|
||||
root = [ "ambroisie" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue