actually enabled sops

This commit is contained in:
John Lancaster
2025-07-07 01:04:48 -05:00
parent 1fe7f9b901
commit cc396c2daf
2 changed files with 11 additions and 4 deletions

View File

@@ -6,6 +6,7 @@
./ghostty.nix ./ghostty.nix
./git.nix ./git.nix
./shell.nix ./shell.nix
./sops.nix
./ssh.nix ./ssh.nix
./vscode.nix ./vscode.nix

View File

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