diff --git a/configuration.nix b/configuration.nix index 6c89bc6..1d84cf9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,9 +9,12 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ./package.nix - ./searXNG.nix + ./module/searXNG.nix + ./module/roundcube.nix ]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -113,13 +116,6 @@ useRoutingFeatures = "server"; # or "client" / "both" }; - services.roundcube = { - enable = false; - hostName = "webmail.example.com"; - }; - - services.nginx.enable = false; - networking.firewall = { enable = true; allowedTCPPorts = [ 443 ]; diff --git a/module/roundcube.nix b/module/roundcube.nix new file mode 100644 index 0000000..89811ab --- /dev/null +++ b/module/roundcube.nix @@ -0,0 +1,35 @@ +{ config, ... }: + +{ + services.roundcube = { + enable = true; + hostName = "_"; + + plugins = [ "multiple_accounts" ]; + + extraConfig = '' + # PurelyMail is the entreprise who host my mail + $config['default_host'] = 'ssl://imap.purelymail.com'; + $config['default_port'] = 993; + $config['smtp_server'] = 'tls://smtp.purelymail.com'; + $config['smtp_port'] = 465; + $config['smtp_user'] = '%u'; + $config['smtp_pass'] = '%p'; + ''; + }; + + services.nginx = { + enable = true; + + virtualHosts."_" = { + listen = [ + { addr = "0.0.0.0"; port = 1984; } + ]; + forceSSL = false; + enableACME = false; + }; + }; + + networking.firewall.allowedTCPPorts = [ 1984 ]; + +} diff --git a/searXNG.nix b/module/searXNG.nix similarity index 100% rename from searXNG.nix rename to module/searXNG.nix diff --git a/module/vaultWarden.nix b/module/vaultWarden.nix new file mode 100644 index 0000000..e69de29