From 4b716ae5ed05bd8971e0c2ea63d12bbad4ec40fd Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 31 Dec 2022 00:25:03 +0000 Subject: [PATCH] Remove dead goaccess configuration code --- configuration.nix | 9 --------- goaccess.nix | 49 ----------------------------------------------- 2 files changed, 58 deletions(-) delete mode 100644 goaccess.nix diff --git a/configuration.nix b/configuration.nix index 3adff77..e5ffe26 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,7 +2,6 @@ imports = [ ./hardware-configuration.nix ./networking.nix # generated at runtime by nixos-infect - ./goaccess.nix ]; nix = { @@ -31,14 +30,6 @@ users.groups.www = {}; services.nginx.group = "www"; - services.goaccess = { - enable = false; - user = "goaccess"; - group = "www"; - dir = "/var/www/goaccess"; - host = "dash.danilafe.com"; - }; - services.danilafe-blog = { enable = true; challengePath = "/var/www/challenges"; diff --git a/goaccess.nix b/goaccess.nix deleted file mode 100644 index 4a522eb..0000000 --- a/goaccess.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ pkgs, config, lib, ... }: -with lib; -let - cfg = config.services.goaccess; -in { - options.services.goaccess = { - enable = mkEnableOption "GoAccess dashboard"; - group = mkOption { - type = types.str; - }; - user = mkOption { - type = types.str; - }; - dir = mkOption { - type = types.str; - }; - host = mkOption { - type = types.str; - }; - }; - config = mkIf cfg.enable { - systemd.services.goaccess = { - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; - description = "GoAccess live dashboard"; - serviceConfig = { - Type = "forking"; - User = cfg.user; - ExecStart = "${pkgs.goaccess}/bin/goaccess --ignore-crawlers -f /var/log/nginx/access.log --enable-panel=REFERRERS --enable-panel=KEYPHRASES --log-format COMBINED -o ${cfg.dir}/report.html --real-time-html"; - Restart = "on-failure"; - }; - }; - users.users."${cfg.user}" = { - isSystemUser = true; - description = "GoAccess runner"; - group = cfg.group; - }; - - systemd.tmpfiles.rules = [ - "d ${cfg.dir} 0755 ${cfg.user} ${cfg.group}" - ]; - - services.nginx.virtualHosts."${cfg.host}" = { - addSSL = true; - enableACME = true; - root = cfg.dir; - }; - }; -}