From d536abf0f113fdee385e15978a09b548e54ce314 Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Sat, 2 Jul 2022 18:20:21 +0000 Subject: [PATCH] modified: hosts/web/configuration.nix modified: hosts/web/webserver.nix modified: modules/common.nix --- hosts/web/configuration.nix | 11 +++-------- hosts/web/webserver.nix | 8 ++++---- modules/common.nix | 7 +++++++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/hosts/web/configuration.nix b/hosts/web/configuration.nix index f8e7dc3..da084db 100644 --- a/hosts/web/configuration.nix +++ b/hosts/web/configuration.nix @@ -9,6 +9,8 @@ ../modules/users.nix ]; + stateVersion = "21.11"; + boot.cleanTmpDir = true; zramSwap.enable = false; networking.hostName = "web"; @@ -16,14 +18,7 @@ enable = true; permitRootLogin = "no"; passwordAuthentication = false; - challengeResponseAuthentication = false; + kbdInteractiveAuthentication = false; }; - # Nix Garbage Collector - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - } diff --git a/hosts/web/webserver.nix b/hosts/web/webserver.nix index 0f3e1a4..f1f6a49 100644 --- a/hosts/web/webserver.nix +++ b/hosts/web/webserver.nix @@ -6,12 +6,12 @@ in services.caddy = { enable = true; email = "lucazeau.alexandre@gmail.com"; - config = '' - { + extraConfig = '' + storage file_system { - root ${caddyDir} + root * ${caddyDir} } - } + https://git.atlanticaweb.fr { encode gzip reverse_proxy http://localhost:3001 diff --git a/modules/common.nix b/modules/common.nix index 3f2a519..747280e 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -15,4 +15,11 @@ procs exa ]; +# Nix Garbage Collector + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }