{ config, pkgs, lib, inputs, hostDir, ... }: let inherit (lib) mkIf; cfg = config.sops; in { imports = [ inputs.sops-nix.nixosModules.sops ]; config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ sops ]; sops = { defaultSopsFile = hostDir + "/secrets.yaml"; gnupg.home = config.homePath + "/.local/share/gnupg"; gnupg.sshKeyPaths = []; }; }; }