{ 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; }; }; }; }; }