get secrets workinggit add ../../modules/system/age.nix

This commit is contained in:
2025-10-04 19:44:07 -05:00
parent b56fdfa659
commit c544f62d70
4 changed files with 34 additions and 10 deletions

View File

@@ -1,24 +1,23 @@
{ pkgs, config, lib, ... }:
{
age.secrets."tailscale_authkey" = {
file = ../../secrets/tailscale_authkey.txt.age;
owner = "blake";
group = "blake";
mode = "0400";
};
#imports = [ agenix.nixosModules.default ];
options = {
modules.system.tailscale.enable = lib.mkEnableOption "enables tailscale";
};
config = lib.mkIf config.modules.system.tailscale.enable {
age.secrets."tailscale_authkey" = {
file = ../../secrets/tailscale_authkey.txt.age;
owner = "blake";
group = "blake";
mode = "0400";
};
services.tailscale = {
enable = true;
};
useRoutingFeatures = "both";
authKeyFile = "/run/agenix/tailscale_authkey";
};
};
}