How to Get sops-nix Working with home-manager Modules

Introduction In this article, I will go over how to get sops-nix to work properly with home-manager. One issue I noticed was that when I used with home-manager modules/options, I would see a string like “%r/secrets/haseeb/…”. The %r would not be replaced. Relevant Issue: https://github.com/Mic92/sops-nix/issues/28 Assumption I will assume you have already setup sops-nix and are using it. In the sense, you have a .sops.yaml file and are already using it with NixOS. The instructions in the README is mostly pretty clear how to get setup, but I may in future create another article how I set up sops-nix. But in this post, we will simply go over how we can make it work with home-manager. I will also assume you are using nix flakes and have passed sops-nix as an input. ...