feat(self_host/nextcloud): removing the sso (not working)
- Think make a branch can be a good idea
This commit is contained in:
parent
c4e36703c9
commit
886b9da521
1 changed files with 25 additions and 49 deletions
|
|
@ -1,15 +1,10 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.service.selfhost.nextcloud;
|
cfg = config.service.selfhost.nextcloud;
|
||||||
dataDir = "/mnt/data/nextcloud";
|
dataDir = "/mnt/data/nextcloud";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg {
|
config = lib.mkIf cfg {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
php
|
php
|
||||||
|
|
@ -17,52 +12,33 @@ in
|
||||||
users = {
|
users = {
|
||||||
groups.datausers = { };
|
groups.datausers = { };
|
||||||
users.nextcloud.extraGroups = [
|
users.nextcloud.extraGroups = [
|
||||||
"datausers"
|
"datausers"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /mnt/data 2770 root datausers -"
|
"d /mnt/data 2770 root datausers -"
|
||||||
];
|
];
|
||||||
services = {
|
services = {
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
https = true;
|
https = true;
|
||||||
package = pkgs.nextcloud32;
|
package = pkgs.nextcloud32;
|
||||||
hostName = "nextcloud.enium.eu";
|
hostName = "nextcloud.enium.eu";
|
||||||
datadir = dataDir;
|
datadir = dataDir;
|
||||||
config = {
|
config = {
|
||||||
adminpassFile = "/etc/nextcloud-pass.txt";
|
adminpassFile = "/etc/nextcloud-pass.txt";
|
||||||
adminuser = "OwnedByTheEniumTeam";
|
adminuser = "OwnedByTheEniumTeam";
|
||||||
dbtype = "sqlite";
|
dbtype = "sqlite";
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
trusted_domains = [
|
||||||
|
"192.168.1.254"
|
||||||
|
"nextcloud.enium.eu"
|
||||||
|
];
|
||||||
|
default_phone_region = "FR";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
extraApps = {
|
|
||||||
oidc_login.enable = true;
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
trusted_domains = [
|
|
||||||
"192.168.1.254"
|
|
||||||
"nextcloud.enium.eu"
|
|
||||||
];
|
|
||||||
default_phone_region = "FR";
|
|
||||||
"oidc_login_provider_url" = "https://auth.enium.eu/application/o/nextcloud/";
|
|
||||||
"oidc_login_client_id" = "xxxxxxxxxxxx";
|
|
||||||
"oidc_login_client_secret" = "yyyyyyyyyyyy";
|
|
||||||
"oidc_login_end_session_redirect" = true;
|
|
||||||
"oidc_login_auto_redirect" = true;
|
|
||||||
"oidc_login_hide_password_form" = true;
|
|
||||||
"oidc_login_use_id_token" = true;
|
|
||||||
"oidc_login_scope" = "openid profile email";
|
|
||||||
"oidc_login_disable_registration" = false;
|
|
||||||
"oidc_login_button_text" = "Se connecter avec Enium";
|
|
||||||
"oidc_login_default_group" = "";
|
|
||||||
"oidc_login_unique_id_claim" = "sub";
|
|
||||||
"oidc_login_mapping_displayname" = "name";
|
|
||||||
"oidc_login_mapping_email" = "email";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
nginx.virtualHosts."nextcloud.enium.eu" = {
|
nginx.virtualHosts."nextcloud.enium.eu" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue