nixos/home/common/optional/sops.nix

22 lines
493 B
Nix

{ inputs, config, osConfig, ... }:
let
secretsDirectory = builtins.toString inputs.nix-secrets;
secretsFile = "${secretsDirectory}/secrets.yaml";
homeDirectory = config.home.homeDirectory;
username = config.home.username;
hostname = osConfig.networking.hostName;
in
{
imports = [
inputs.sops-nix.homeManagerModules.sops
];
sops = {
age.sshKeyPaths = ["${homeDirectory}/.ssh/id_ed25519"];
defaultSopsFile = "${secretsFile}";
validateSopsFiles = false;
};
}