summaryrefslogtreecommitdiff
path: root/os/srv/sops.nix
diff options
context:
space:
mode:
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;
+ };
+ };
+ };
+ };
+}