Files
jsl-home/homeManagerModules/sops.nix
John Lancaster 1fe7f9b901 redid path
2025-07-07 00:53:56 -05:00

13 lines
490 B
Nix

{ inputs, config, pkgs, lib, ... }:
let
sopsConfigPath = "${config.home.homeDirectory}/.config/home-manager/jsl-home/.sops.yaml";
in
{
sops = {
# It's also possible to use a ssh key, but only when it has no password:
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
defaultSopsFile = ./secrets.yaml;
defaultSopsFormat = "yaml";
};
programs.zsh.shellAliases.sops = lib.mkIf config.enableShell "${pkgs.sops-nix}/bin/sops --config ${sopsConfigPath}";
}