summaryrefslogtreecommitdiff
path: root/os/srv/sops.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-02-08 18:03:39 +0100
committeradikro <adikro@disroot.org>2026-02-08 18:03:39 +0100
commit2c8a4dd99efd61298bc18393e7fcbf6063db8671 (patch)
tree1efd5ac8f5bcf7b1611cec1beaa545e6a2c14160 /os/srv/sops.nix
parenteb95abfc230dc239122f1e89e90cd9a998491a2f (diff)
...
Diffstat (limited to 'os/srv/sops.nix')
-rw-r--r--os/srv/sops.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/os/srv/sops.nix b/os/srv/sops.nix
new file mode 100644
index 0000000..85a5123
--- /dev/null
+++ b/os/srv/sops.nix
@@ -0,0 +1,28 @@
+{
+ config,
+ lib,
+ username,
+ ...
+}:
+let
+ cfg = config.os.srv.sops;
+in
+{
+ options.os.srv.sops.enable = lib.mkEnableOption "enables sops-nix secret storing";
+ config = lib.mkIf cfg.enable {
+ sops = {
+ defaultSopsFile = ../../secrets.yaml;
+ defaultSopsFormat = "yaml";
+ age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
+
+ secrets = {
+ "syncthing/gui_password" = {
+ owner = config.services.syncthing.user;
+ };
+ "obs/websocket_password" = {
+ owner = username;
+ };
+ };
+ };
+ };
+}