migrate to stalwart-mail
This commit is contained in:
parent
f0b4a2c37a
commit
a717779e6a
3 changed files with 66 additions and 27 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -23,3 +23,6 @@
|
||||||
[submodule "calendar-js"]
|
[submodule "calendar-js"]
|
||||||
path = calendar-js
|
path = calendar-js
|
||||||
url = https://github.com/nextcloud/calendar-js.git
|
url = https://github.com/nextcloud/calendar-js.git
|
||||||
|
[submodule "files_mindmap"]
|
||||||
|
path = files_mindmap
|
||||||
|
url = https://github.com/onny/files_mindmap.git
|
||||||
|
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719253556,
|
"lastModified": 1719426051,
|
||||||
"narHash": "sha256-A/76RFUVxZ/7Y8+OMVL1Lc8LRhBxZ8ZE2bpMnvZ1VpY=",
|
"narHash": "sha256-yJL9VYQhaRM7xs0M867ZFxwaONB9T2Q4LnGo1WovuR4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fc07dc3bdf2956ddd64f24612ea7fc894933eb2e",
|
"rev": "89c49874fb15f4124bf71ca5f42a04f2ee5825fd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,12 @@
|
||||||
# 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/
|
||||||
|
|
@ -105,6 +111,10 @@
|
||||||
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" = {
|
||||||
|
target = /home/onny/projects/nixos-nextcloud-testumgebung/files_mindmap;
|
||||||
|
cache = "none";
|
||||||
|
};
|
||||||
#"/var/lib/nextcloud/server" = {
|
#"/var/lib/nextcloud/server" = {
|
||||||
# target = /home/onny/projects/nixos-nextcloud-testumgebung/server;
|
# target = /home/onny/projects/nixos-nextcloud-testumgebung/server;
|
||||||
# cache = "none";
|
# cache = "none";
|
||||||
|
|
@ -114,30 +124,56 @@
|
||||||
#services.nginx.virtualHosts."localhost".root = lib.mkForce "/var/lib/nextcloud/server";
|
#services.nginx.virtualHosts."localhost".root = lib.mkForce "/var/lib/nextcloud/server";
|
||||||
|
|
||||||
# Setup mail server
|
# Setup mail server
|
||||||
# FIXME maybe switchto stalwart
|
services.stalwart-mail = {
|
||||||
services.maddy = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# FIXME remove package definition in 24.11
|
||||||
|
package = pkgs.stalwart-mail;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
hostname = "localhost";
|
hostname = "localhost";
|
||||||
primaryDomain = "localhost";
|
tls.enable = false;
|
||||||
localDomains = [
|
listener = {
|
||||||
"$(primary_domain)"
|
"smtp-submission" = {
|
||||||
"10.0.2.0/24"
|
bind = [ "[::]:587" ];
|
||||||
"10.100.100.1"
|
protocol = "smtp";
|
||||||
"127.0.0.1"
|
};
|
||||||
|
"imap" = {
|
||||||
|
bind = [ "[::]:143" ];
|
||||||
|
protocol = "imap";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
imap.auth.allow-plain-text = true;
|
||||||
|
session.auth = {
|
||||||
|
mechanisms = "[plain, login]";
|
||||||
|
directory = "'in-memory'";
|
||||||
|
};
|
||||||
|
storage.directory = "in-memory";
|
||||||
|
session.rcpt.directory = "'in-memory'";
|
||||||
|
queue.outbound.next-hop = "'local'";
|
||||||
|
directory."in-memory" = {
|
||||||
|
type = "memory";
|
||||||
|
principals = [
|
||||||
|
{
|
||||||
|
class = "individual";
|
||||||
|
name = "user1";
|
||||||
|
secret = "test123";
|
||||||
|
email = [ "user1@localhost" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
class = "individual";
|
||||||
|
name = "user2";
|
||||||
|
secret = "test123";
|
||||||
|
email = [ "user2@localhost" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
class = "individual";
|
||||||
|
name = "admin";
|
||||||
|
secret = "test123";
|
||||||
|
email = [ "admin@localhost" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
# Disable any sender vhttps://github.com/obsidiansystems/ipfs-nix-guide/alidation checks
|
};
|
||||||
config = lib.concatStrings (
|
|
||||||
builtins.match "(.*)authorize_sender.*identity\n[ ]+\}(.*)" options.services.maddy.config.default
|
|
||||||
);
|
|
||||||
ensureAccounts = [
|
|
||||||
"user1@localhost"
|
|
||||||
"user2@localhost"
|
|
||||||
"admin@localhost"
|
|
||||||
];
|
|
||||||
ensureCredentials = {
|
|
||||||
"user1@localhost".passwordFile = "${pkgs.writeText "password" "test123"}";
|
|
||||||
"user2@localhost".passwordFile = "${pkgs.writeText "password" "test123"}";
|
|
||||||
"admin@localhost".passwordFile = "${pkgs.writeText "password" "test123"}";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -150,7 +186,7 @@
|
||||||
auth = "login";
|
auth = "login";
|
||||||
tls = "off";
|
tls = "off";
|
||||||
from = "admin@localhost";
|
from = "admin@localhost";
|
||||||
user = "admin@localhost";
|
user = "admin";
|
||||||
password = "test123";
|
password = "test123";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue