nixos/alps: init module
This commit is contained in:
parent
3ae83c60f4
commit
85f0887662
@ -225,6 +225,13 @@
|
|||||||
<link linkend="opt-services.outline.enable">services.outline</link>.
|
<link linkend="opt-services.outline.enable">services.outline</link>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<link xlink:href="https://git.sr.ht/~migadu/alps">alps</link>,
|
||||||
|
a simple and extensible webmail. Available as
|
||||||
|
<link linkend="opt-services.alps.enable">services.alps</link>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<link xlink:href="https://netbird.io">netbird</link>, a zero
|
<link xlink:href="https://netbird.io">netbird</link>, a zero
|
||||||
|
@ -83,6 +83,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||||||
|
|
||||||
- [Outline](https://www.getoutline.com/), a wiki and knowledge base similar to Notion. Available as [services.outline](#opt-services.outline.enable).
|
- [Outline](https://www.getoutline.com/), a wiki and knowledge base similar to Notion. Available as [services.outline](#opt-services.outline.enable).
|
||||||
|
|
||||||
|
- [alps](https://git.sr.ht/~migadu/alps), a simple and extensible webmail. Available as [services.alps](#opt-services.alps.enable).
|
||||||
|
|
||||||
- [netbird](https://netbird.io), a zero configuration VPN.
|
- [netbird](https://netbird.io), a zero configuration VPN.
|
||||||
Available as [services.netbird](options.html#opt-services.netbird.enable).
|
Available as [services.netbird](options.html#opt-services.netbird.enable).
|
||||||
|
|
||||||
|
@ -1054,6 +1054,7 @@
|
|||||||
./services/video/epgstation/default.nix
|
./services/video/epgstation/default.nix
|
||||||
./services/video/mirakurun.nix
|
./services/video/mirakurun.nix
|
||||||
./services/video/replay-sorcery.nix
|
./services/video/replay-sorcery.nix
|
||||||
|
./services/web-apps/alps.nix
|
||||||
./services/web-apps/atlassian/confluence.nix
|
./services/web-apps/atlassian/confluence.nix
|
||||||
./services/web-apps/atlassian/crowd.nix
|
./services/web-apps/atlassian/crowd.nix
|
||||||
./services/web-apps/atlassian/jira.nix
|
./services/web-apps/atlassian/jira.nix
|
||||||
|
96
nixos/modules/services/web-apps/alps.nix
Normal file
96
nixos/modules/services/web-apps/alps.nix
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.alps;
|
||||||
|
in {
|
||||||
|
options.services.alps = {
|
||||||
|
enable = mkEnableOption (lib.mdDoc "alps");
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 1323;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
TCP port the service should listen on.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
bindIP = mkOption {
|
||||||
|
default = "[::]";
|
||||||
|
type = types.str;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The IP the service should listen on.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
theme = mkOption {
|
||||||
|
type = types.enum [ "alps" "sourcehut" ];
|
||||||
|
default = "sourcehut";
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The frontend's theme to use.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
imaps = {
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 993;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The IMAPS server port.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
host = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "[::1]";
|
||||||
|
example = "mail.example.org";
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The IMAPS server address.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
smtps = {
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 445;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The SMTPS server port.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
host = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = cfg.imaps.host;
|
||||||
|
defaultText = "services.alps.imaps.host";
|
||||||
|
example = "mail.example.org";
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The SMTPS server address.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.alps = {
|
||||||
|
description = "alps is a simple and extensible webmail.";
|
||||||
|
documentation = [ "https://git.sr.ht/~migadu/alps" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" "network-online.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.alps}/bin/alps \
|
||||||
|
-addr ${cfg.bindIP}:${toString cfg.port} \
|
||||||
|
-theme ${cfg.theme} \
|
||||||
|
imaps://${cfg.imaps.host}:${toString cfg.imaps.port} \
|
||||||
|
smpts://${cfg.smtps.host}:${toString cfg.smtps.port}
|
||||||
|
'';
|
||||||
|
StateDirectory = "alps";
|
||||||
|
WorkingDirectory = "/var/lib/alps";
|
||||||
|
DynamicUser = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user