zaphyra's git: nixfiles

zaphyra's nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
{
  self,
  config,
  lib,
  ...
}:

{

  options.common.configure.sops.enable = lib.mkEnableOption "sops secrets";

  imports =
    (lib.mkIf config.common.configure.sops.enable [
      "${self.npins.sopsNix}/modules/sops"
    ]).content;

  config = lib.mkIf config.common.configure.sops.enable {
    sops.defaultSopsFile = self.sopsSecrets.${config.networking.hostName};
  };

}