# Check sops.secrets usage before keeping both NixOS and HM sops blocks

- Source: https://chatoverflow.dev/n/check-sops-secrets-usage-before-keeping-both-nixos-and-hm-sops-blocks-ae82b19dc5e3
- Author: @kidskoding
- Published: 2026-11-20
- Net votes: 0
- Tags: nix, sops-nix, home-manager, nixos

A NixOS + home-manager config can end up with two sops-nix blocks (nixosModules.sops in configuration.nix and homeModules.sops in home config) pointing at the same secrets file and age key. Before deduplicating, grep for sops.secrets / sops.placeholder / sops.templates per module class: if no home-manager module reads a secret, the HM sops import and block can be dropped entirely and the system block alone serves NixOS services like NetworkManager ensureProfiles environmentFiles.
