From cdeb52f8080eee519cd4a64541f03a0d5ac73080 Mon Sep 17 00:00:00 2001 From: hexchen Date: Sat, 7 Aug 2021 21:26:56 +0000 Subject: [PATCH] services/mail: migrate to parsons --- hosts/hainich/configuration.nix | 6 ------ hosts/parsons/configuration.nix | 1 + nix/sources.json | 15 ++++++++------- {hosts/hainich/services => services}/mail.nix | 10 +++++----- 4 files changed, 14 insertions(+), 18 deletions(-) rename {hosts/hainich/services => services}/mail.nix (97%) diff --git a/hosts/hainich/configuration.nix b/hosts/hainich/configuration.nix index 0e9a02c..8980ae0 100644 --- a/hosts/hainich/configuration.nix +++ b/hosts/hainich/configuration.nix @@ -5,9 +5,6 @@ ../../common ./encboot.nix ./hardware.nix - ./services/mail.nix - ./services/hedgedoc_hacc.nix - ./services/hedgedoc_i4f.nix ../../common # ./wireguard.nix ./services/nginx.nix @@ -16,9 +13,6 @@ ./services/gitlab-runner.nix ./services/lantifa.nix ./services/syncthing.nix - ./services/monitoring.nix - ./services/workadventure.nix - ./services/mattermost.nix ]; boot.loader.grub.enable = true; boot.loader.grub.version = 2; diff --git a/hosts/parsons/configuration.nix b/hosts/parsons/configuration.nix index 2a6253e..310b4c5 100644 --- a/hosts/parsons/configuration.nix +++ b/hosts/parsons/configuration.nix @@ -14,6 +14,7 @@ ../../services/murmur.nix ../../services/hedgedoc-hacc.nix ../../services/hedgedoc-i4f.nix + ../../services/mail.nix ]; hexchen.encboot = { diff --git a/nix/sources.json b/nix/sources.json index 0ae1fe7..1c11518 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -59,19 +59,20 @@ "branch": "main", "ref": "main", "repo": "https://gitlab.com/hexchen/nixfiles", - "rev": "1ae89906c8fb5cf45384eb2821bd89c807c1564f", - "sha256": "03yicni5jfr5qjillj3dp899n3lq7dhqrg66dr0w1vy12d0lp43s", + "rev": "ef358992030e9a6fa975a24bf4d9aa133bc72424", + "sha256": "01hcdrpfc8g1bbc96h7gi04zmyxi9vd7392ncadwfkx5xfd2fp17", "type": "tarball", - "url": "https://gitlab.com/hexchen/nixfiles/-/archive/1ae89906c8fb5cf45384eb2821bd89c807c1564f.tar.gz", + "url": "https://gitlab.com/hexchen/nixfiles/-/archive/ef358992030e9a6fa975a24bf4d9aa133bc72424.tar.gz", "url_template": "/-/archive/.tar.gz" }, "nixos-mailserver": { - "ref": "nixos-20.09", + "branch": "nixos-21.05", + "ref": "nixos-21.05", "repo": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver", - "rev": "fb1cc04c0a517d4200237b02c3472bcaf9104afb", - "sha256": "0vsvgxxg5cgmzwj98171j7h5l028f1yq784alb3lxgbk8znfk51y", + "rev": "5675b122a947b40e551438df6a623efad19fd2e7", + "sha256": "1fwhb7a5v9c98nzhf3dyqf3a5ianqh7k50zizj8v5nmj3blxw4pi", "type": "tarball", - "url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/fb1cc04c0a517d4200237b02c3472bcaf9104afb/nixos-mailserver-fb1cc04c0a517d4200237b02c3472bcaf9104afb.tar.gz", + "url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/5675b122a947b40e551438df6a623efad19fd2e7.tar.gz", "url_template": "/-/archive/.tar.gz" }, "nixpkgs": { diff --git a/hosts/hainich/services/mail.nix b/services/mail.nix similarity index 97% rename from hosts/hainich/services/mail.nix rename to services/mail.nix index ecd083c..6c0dfd7 100644 --- a/hosts/hainich/services/mail.nix +++ b/services/mail.nix @@ -1,14 +1,12 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, sources, ... }: -let - sources = import ../../../nix/sources.nix; -in { +{ imports = [ sources.nixos-mailserver.outPath ]; mailserver = { - mailDirectory = "/data/mail"; + mailDirectory = "/persist/mail"; enable = true; fqdn = "mail.hacc.space"; domains = [ "hacc.space" "muc.hacc.space" "hacc.earth" "4future.dev" "4futu.re" "infra4future.de" "discuss.infra4future.de" ]; @@ -145,6 +143,8 @@ in { enable = true; script = "${pkgs.alps}/bin/alps -theme alps imaps://mail.hacc.space:993 smtps://mail.hacc.space:465"; serviceConfig.WorkingDirectory = "${pkgs.alps}/share/alps"; + serviceConfig.Restart = "always"; + requiredBy = [ "multi-user.target" ]; }; services.nginx.virtualHosts."mail.hacc.space" = {