Files
nix-config-ryan4yin/secrets/default.nix
2023-05-21 03:19:46 +08:00

32 lines
833 B
Nix

{ config, pkgs, agenix, ... }:
{
imports = [
agenix.nixosModules.default
];
environment.systemPackages = [
agenix.packages."${pkgs.system}".default
];
# # wireguard config used with `wg-quick up wg-business`
age.secrets."wg-business.conf" = {
# wether secrets are symlinked to age.secrets.<name>.path
symlink = true;
# target path for decrypted file
path = "/etc/wireguard/";
# encrypted file path
file = ./encrypt/wg-business.conf.age;
mode = "0400";
owner = "root";
group = "root";
};
# smb-credentials is referenced in /etc/fstab, by ../hosts/msi-rtx4090/cifs-mount.nix
age.secrets."smb-credentials" = {
# wether secrets are symlinked to age.secrets.<name>.path
symlink = true;
# encrypted file path
file = ./encrypt/smb-credentials.age;
};
}