moved sops stuff into sops.nix

This commit is contained in:
John Lancaster
2025-07-07 01:10:11 -05:00
parent cc396c2daf
commit be5a15f3d4
2 changed files with 6 additions and 4 deletions

View File

@@ -1,9 +1,12 @@
{ config, pkgs, lib, ... }:
{ inputs, config, pkgs, lib, ... }:
let
sopsConfigPath = "${config.home.homeDirectory}/.config/home-manager/jsl-home/.sops.yaml";
sopsSecretsPath = "${config.home.homeDirectory}/.config/home-manager/jsl-home/keys/secrets.yaml";
in
{
imports = [
inputs.sops-nix.homeManagerModules.sops
];
sops = {
# It's also possible to use a ssh key, but only when it has no password:
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
@@ -14,6 +17,8 @@ in
(writeShellScriptBin "edit-secrets" ''
sops --config ${sopsConfigPath} ${sopsSecretsPath}
'')
sops
age
];
programs.zsh.shellAliases.sops = lib.mkIf config.enableShell "sops --config ${sopsConfigPath}";
}