synix/modules/home/sops/default.nix
sid 95a533c876
All checks were successful
Deploy docs / build-and-deploy (push) Successful in 3s
initial commit
2026-02-23 20:34:35 +01:00

22 lines
447 B
Nix

{
inputs,
config,
lib,
pkgs,
...
}:
let
secrets = "${toString inputs.self}/users/${config.home.username}/home/secrets/secrets.yaml";
in
{
imports = [ inputs.sops-nix.homeManagerModules.sops ];
home.packages = with pkgs; [
age
sops
];
sops.defaultSopsFile = lib.mkIf (builtins.pathExists secrets) (lib.mkDefault secrets);
sops.age.keyFile = lib.mkDefault "${config.home.homeDirectory}/.config/sops/age/keys.txt";
}