lol

nixos/go-autoconfig: init module

authored by

Jonas Heinrich and committed by
Yt
d990f88f 91f63651

+76
+7
nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
··· 265 265 </listitem> 266 266 <listitem> 267 267 <para> 268 + <link xlink:href="https://github.com/L11R/go-autoconfig">go-autoconfig</link>, 269 + IMAP/SMTP autodiscover server. Available as 270 + <link linkend="opt-services.go-autoconfig.enable">services.go-autoconfig</link>. 271 + </para> 272 + </listitem> 273 + <listitem> 274 + <para> 268 275 <link xlink:href="https://www.grafana.com/oss/tempo/">Grafana 269 276 Tempo</link>, a distributed tracing store. Available as 270 277 <link linkend="opt-services.tempo.enable">services.tempo</link>.
+2
nixos/doc/manual/release-notes/rl-2211.section.md
··· 94 94 95 95 - [expressvpn](https://www.expressvpn.com), the CLI client for ExpressVPN. Available as [services.expressvpn](#opt-services.expressvpn.enable). 96 96 97 + - [go-autoconfig](https://github.com/L11R/go-autoconfig), IMAP/SMTP autodiscover server. Available as [services.go-autoconfig](#opt-services.go-autoconfig.enable). 98 + 97 99 - [Grafana Tempo](https://www.grafana.com/oss/tempo/), a distributed tracing store. Available as [services.tempo](#opt-services.tempo.enable). 98 100 99 101 - [AusweisApp2](https://www.ausweisapp.bund.de/), the authentication software for the German ID card. Available as [programs.ausweisapp](#opt-programs.ausweisapp.enable).
+1
nixos/modules/module-list.nix
··· 804 804 ./services/networking/git-daemon.nix 805 805 ./services/networking/globalprotect-vpn.nix 806 806 ./services/networking/gnunet.nix 807 + ./services/networking/go-autoconfig.nix 807 808 ./services/networking/go-neb.nix 808 809 ./services/networking/go-shadowsocks2.nix 809 810 ./services/networking/gobgpd.nix
+66
nixos/modules/services/networking/go-autoconfig.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + 7 + cfg = config.services.go-autoconfig; 8 + format = pkgs.formats.yaml { }; 9 + configFile = format.generate "config.yml" cfg.settings; 10 + 11 + in { 12 + options = { 13 + services.go-autoconfig = { 14 + 15 + enable = mkEnableOption (mdDoc "IMAP/SMTP autodiscover feature for mail clients"); 16 + 17 + settings = mkOption { 18 + default = { }; 19 + description = mdDoc '' 20 + Configuration for go-autoconfig. See 21 + <https://github.com/L11R/go-autoconfig/blob/master/config.yml> 22 + for more information. 23 + ''; 24 + type = types.submodule { 25 + freeformType = format.type; 26 + }; 27 + example = literalExpression '' 28 + { 29 + service_addr = ":1323"; 30 + domain = "autoconfig.example.org"; 31 + imap = { 32 + server = "example.org"; 33 + port = 993; 34 + }; 35 + smtp = { 36 + server = "example.org"; 37 + port = 465; 38 + }; 39 + } 40 + ''; 41 + }; 42 + 43 + }; 44 + }; 45 + 46 + config = mkIf cfg.enable { 47 + 48 + systemd = { 49 + services.go-autoconfig = { 50 + wantedBy = [ "multi-user.target" ]; 51 + description = "IMAP/SMTP autodiscover server"; 52 + after = [ "network.target" ]; 53 + serviceConfig = { 54 + ExecStart = "${pkgs.go-autoconfig}/bin/go-autoconfig -config ${configFile}"; 55 + Restart = "on-failure"; 56 + WorkingDirectory = ''${pkgs.go-autoconfig}/''; 57 + DynamicUser = true; 58 + }; 59 + }; 60 + }; 61 + 62 + }; 63 + 64 + meta.maintainers = with lib.maintainers; [ onny ]; 65 + 66 + }