From ad2adbd0d1cc466e385e55ae1ce2e5b969774b5e Mon Sep 17 00:00:00 2001 From: hexchen Date: Sat, 5 Dec 2020 18:56:49 +0000 Subject: [PATCH] hainich: add webmail (alps) --- configuration/hosts/hainich/services/mail.nix | 5 ++++ pkgs/alps/default.nix | 25 +++++++++++++++++++ pkgs/default.nix | 1 + 3 files changed, 31 insertions(+) create mode 100644 pkgs/alps/default.nix diff --git a/configuration/hosts/hainich/services/mail.nix b/configuration/hosts/hainich/services/mail.nix index 2197b01..44b339f 100644 --- a/configuration/hosts/hainich/services/mail.nix +++ b/configuration/hosts/hainich/services/mail.nix @@ -177,4 +177,9 @@ contact@hacc.space info@hacc.space''; ''; }; + systemd.services.alps = { + enable = true; + script = "${pkgs.alps}/bin/alps -theme sourcehut imaps://mail.hacc.space:993 smtps://mail.hacc.space:465"; + unitConfig.WorkingDirectory = "${pkgs.alps}/share/alps"; + }; } diff --git a/pkgs/alps/default.nix b/pkgs/alps/default.nix new file mode 100644 index 0000000..d96362b --- /dev/null +++ b/pkgs/alps/default.nix @@ -0,0 +1,25 @@ +{ lib, buildGoModule }: + +buildGoModule rec { + pname = "alps"; + version = "0.0.1"; + + src = fetchGit { + url = "https://git.sr.ht/~migadu/alps"; + rev = "5cef0aaff2b8b6ee3e00b566123517e241d8cfb8"; + }; + + vendorSha256 = "0hdfh6zdrjq97yj60dfsncl02cp8rpx4d4cqhk3zj0bhmpmrzddi"; + + subPackages = [ "cmd/alps" ]; + + postInstall = '' + mkdir -p $out/share/alps + cp -r $src/themes $out/share/alps/ + ''; + + meta = with lib; { + description = "A simple and extensible webmail."; + homepage = "https://git.sr.ht/~migadu/alps"; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index e81c69f..78f307f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -18,6 +18,7 @@ let # package = callPackage ./package {}; wasi = import wasiSrc { inherit wasiSrc; pkgs = pkgs // newpkgs; }; peertube = callPackage ./peertube { mylibs = import "${immaeNix}/lib" { inherit pkgs; }; }; + alps = callPackage ./alps {}; }; in newpkgs