Fix provisioning of admin mail
This commit is contained in:
parent
a717779e6a
commit
d4d2d16c07
3 changed files with 1279 additions and 13 deletions
|
|
@ -87,11 +87,9 @@ in {
|
||||||
export OC_PASS="$(cat ${escapeShellArg cfg.passwordFile})"
|
export OC_PASS="$(cat ${escapeShellArg cfg.passwordFile})"
|
||||||
${config.services.nextcloud.occ}/bin/nextcloud-occ user:add --password-from-env "${name}"
|
${config.services.nextcloud.occ}/bin/nextcloud-occ user:add --password-from-env "${name}"
|
||||||
fi
|
fi
|
||||||
if ! ${config.services.nextcloud.occ}/bin/nextcloud-occ user:info "${name}" | grep "user not found"; then
|
${optionalString (cfg.email != null) ''
|
||||||
${optionalString (cfg.email != null) ''
|
${config.services.nextcloud.occ}/bin/nextcloud-occ user:setting "${name}" settings email "${cfg.email}"
|
||||||
${config.services.nextcloud.occ}/bin/nextcloud-occ user:setting "${name}" settings email "${cfg.email}"
|
''}
|
||||||
''}
|
|
||||||
fi
|
|
||||||
'') cfg.ensureUsers)}
|
'') cfg.ensureUsers)}
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
1257
nextcloud.nix
Normal file
1257
nextcloud.nix
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -5,7 +5,14 @@
|
||||||
cores = 4;
|
cores = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Workaround for bug, disable pretty urls
|
||||||
|
# https://github.com/nextcloud/server/issues/44685
|
||||||
|
disabledModules = [
|
||||||
|
"services/web-apps/nextcloud.nix"
|
||||||
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
./nextcloud.nix
|
||||||
./nextcloud-extras.nix
|
./nextcloud-extras.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -15,12 +22,6 @@
|
||||||
# Remove first run wizard and password policy check from Nextcloud
|
# Remove first run wizard and password policy check from Nextcloud
|
||||||
# package
|
# package
|
||||||
nextcloud29 = super.nextcloud29.overrideAttrs (oldAttrs: rec {
|
nextcloud29 = super.nextcloud29.overrideAttrs (oldAttrs: rec {
|
||||||
version = "29.0.3";
|
|
||||||
# FIXME
|
|
||||||
src = builtins.fetchurl {
|
|
||||||
url = "https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2";
|
|
||||||
sha256 = "1m3zvcf77mrb7bhhn4hb53ry5f1nqwl5p3sdhkw2f28j9iv6x6d5";
|
|
||||||
};
|
|
||||||
installPhase = oldAttrs.installPhase + ''
|
installPhase = oldAttrs.installPhase + ''
|
||||||
mkdir -p $out/
|
mkdir -p $out/
|
||||||
cp -R . $out/
|
cp -R . $out/
|
||||||
|
|
@ -65,6 +66,10 @@
|
||||||
adminpassFile = "${pkgs.writeText "adminpass" "test123"}";
|
adminpassFile = "${pkgs.writeText "adminpass" "test123"}";
|
||||||
};
|
};
|
||||||
ensureUsers = {
|
ensureUsers = {
|
||||||
|
admin = {
|
||||||
|
email = "admin@localhost";
|
||||||
|
passwordFile = "${pkgs.writeText "password" "test123"}";
|
||||||
|
};
|
||||||
user1 = {
|
user1 = {
|
||||||
email = "user1@localhost";
|
email = "user1@localhost";
|
||||||
passwordFile = "${pkgs.writeText "password" "test123"}";
|
passwordFile = "${pkgs.writeText "password" "test123"}";
|
||||||
|
|
@ -111,8 +116,8 @@
|
||||||
target = /home/onny/projects/nixos-nextcloud-testumgebung/cleanup;
|
target = /home/onny/projects/nixos-nextcloud-testumgebung/cleanup;
|
||||||
cache = "none";
|
cache = "none";
|
||||||
};
|
};
|
||||||
"/var/lib/nextcloud/store-apps/files_mindmap" = {
|
"/var/lib/nextcloud/store-apps/files_mindmap2" = {
|
||||||
target = /home/onny/projects/nixos-nextcloud-testumgebung/files_mindmap;
|
target = /home/onny/projects/nixos-nextcloud-testumgebung/files_mindmap2;
|
||||||
cache = "none";
|
cache = "none";
|
||||||
};
|
};
|
||||||
#"/var/lib/nextcloud/server" = {
|
#"/var/lib/nextcloud/server" = {
|
||||||
|
|
@ -129,6 +134,12 @@
|
||||||
# FIXME remove package definition in 24.11
|
# FIXME remove package definition in 24.11
|
||||||
package = pkgs.stalwart-mail;
|
package = pkgs.stalwart-mail;
|
||||||
settings = {
|
settings = {
|
||||||
|
tracer.stdout = {
|
||||||
|
type = "stdout";
|
||||||
|
level = "debug";
|
||||||
|
enable = true;
|
||||||
|
ansi = true;
|
||||||
|
};
|
||||||
server = {
|
server = {
|
||||||
hostname = "localhost";
|
hostname = "localhost";
|
||||||
tls.enable = false;
|
tls.enable = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue