summaryrefslogtreecommitdiff
path: root/system/sops.nix
diff options
context:
space:
mode:
Diffstat (limited to 'system/sops.nix')
-rw-r--r--system/sops.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/system/sops.nix b/system/sops.nix
new file mode 100644
index 0000000..17f6f13
--- /dev/null
+++ b/system/sops.nix
@@ -0,0 +1,27 @@
+{
+ 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 = [];
+ };
+ };
+}