feat: add sops-nix

This commit is contained in:
lightly-toasted 2025-08-23 21:38:58 +09:00
parent 7e57ae8088
commit 4a948cc348
10 changed files with 85 additions and 5 deletions

View file

@ -4,6 +4,7 @@
imports =
[
inputs.nix-flatpak.nixosModules.nix-flatpak
inputs.sops-nix.nixosModules.sops
./hardware-configuration.nix
./modules/boot.nix
@ -15,8 +16,9 @@
./modules/hardware.nix
./modules/environment.nix
./modules/programs.nix
./modules/sops.nix
];
system.stateVersion = "25.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}
}

View file

@ -18,7 +18,10 @@
};
};
};
services.tailscale.enable = true;
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets."tailscale/authkey".path;
};
services.flatpak = {
enable = true;
packages = [

View file

@ -0,0 +1,10 @@
{ rootPath, ... }:
{
sops.defaultSopsFile = rootPath + /secrets/secrets.yaml;
sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/toast/.config/sops/age/keys.txt";
sops.secrets."tailscale/authkey" = { };
}