chore(agenix): remove comments, add generators

This commit is contained in:
reo101 2023-12-25 19:06:20 +02:00
parent 76e07bf587
commit 5efe96a1de
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
3 changed files with 8 additions and 17 deletions

View file

@ -71,13 +71,10 @@
# NOTE: made with `mkpasswd -m sha-516`
age.secrets."jeeves.user.password" = {
# file = ../../../../secrets/home/jeeves/user/password.age;
# file = "${inputs.self}/secrets/home/jeeves/user/password.age";
# FIXME: agenix-rekey
rekeyFile = "${inputs.self}/secrets/home/jeeves/user/password.age";
# generator = {pkgs, ...}: ''
# ${pkgs.mkpasswd}/bin/mkpasswd -m sha-516
# '';
generator = {pkgs, ...}: ''
${pkgs.mkpasswd}/bin/mkpasswd -m sha-516
'';
};
users = {

View file

@ -4,9 +4,6 @@
];
age.secrets."home.wifi.env" = {
# file = ../../../../secrets/home/wifi/env.age;
# file = "${inputs.self}/secrets/home/wifi/env.age";
# FIXME: agenix-rekey
rekeyFile = "${inputs.self}/secrets/home/wifi/env.age";
};
networking.wireless = {

View file

@ -11,16 +11,13 @@
# Server
age.secrets."wireguard.private" = {
# file = ../../../../secrets/home/jeeves/wireguard/private.age;
# file = "${inputs.self}/secrets/home/jeeves/wireguard/private.age";
mode = "077";
# FIXME: agenix-rekey
rekeyFile = "${inputs.self}/secrets/home/jeeves/wireguard/private.age";
# generator = {lib, pkgs, file, ...}: ''
# priv=$(${pkgs.wireguard-tools}/bin/wg genkey)
# ${pkgs.wireguard-tools}/bin/wg pubkey <<< "$priv" > ${lib.escapeShellArg (lib.removeSuffix ".age" file + ".pub")}
# echo "$priv"
# '';
generator = {lib, pkgs, file, ...}: ''
priv=$(${pkgs.wireguard-tools}/bin/wg genkey)
${pkgs.wireguard-tools}/bin/wg pubkey <<< "$priv" > ${lib.escapeShellArg (lib.removeSuffix ".age" file + ".pub")}
echo "$priv"
'';
};
networking.firewall.allowedUDPPorts = [51820];