From 5b45fc513f016b21bb64cf1901669c01fb4a8c8c Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Mon, 8 Jan 2024 00:46:04 +0100 Subject: [PATCH] Add a dex file (probably useless) and make onlyoffice be able to edit nextcloud files --- .../package-configs/dex/configuration.nix | 31 +++++++++++++++++++ .../nextcloud/configuration.nix | 1 + 2 files changed, 32 insertions(+) create mode 100644 nixos/server/package-configs/dex/configuration.nix diff --git a/nixos/server/package-configs/dex/configuration.nix b/nixos/server/package-configs/dex/configuration.nix new file mode 100644 index 0000000..7779479 --- /dev/null +++ b/nixos/server/package-configs/dex/configuration.nix @@ -0,0 +1,31 @@ +{ + config, + pkgs, + ... +}: { + services.dex = { + enable = true; + # You can add secret files here + environmentFile = null; + settings = { + # External url + issuer = "http://127.0.0.1:5556/dex"; + storage = { + type = "postgres"; + config.host = "/var/run/postgres"; + }; + web = { + http = "127.0.0.1:5556"; + }; + enablePasswordDB = true; + staticClients = [ + { + id = "oidcclient"; + name = "Client"; + redirectURIs = ["https://example.com/callback"]; + secretFile = "/etc/dex/oidcclient"; # The content of `secretFile` will be written into to the config as `secret`. + } + ]; + }; + }; +} diff --git a/nixos/server/package-configs/nextcloud/configuration.nix b/nixos/server/package-configs/nextcloud/configuration.nix index 34b1926..057d588 100644 --- a/nixos/server/package-configs/nextcloud/configuration.nix +++ b/nixos/server/package-configs/nextcloud/configuration.nix @@ -13,6 +13,7 @@ users.users = { nextcloud.extraGroups = [config.users.groups.keys.name "aria2" "onlyoffice"]; aria2.extraGroups = ["nextcloud"]; + onlyoffice.extraGroups = ["nextcloud"]; }; # Enable Nginx