Remove dead goaccess configuration code
This commit is contained in:
parent
3561027ca5
commit
4b716ae5ed
@ -2,7 +2,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./networking.nix # generated at runtime by nixos-infect
|
./networking.nix # generated at runtime by nixos-infect
|
||||||
./goaccess.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
@ -31,14 +30,6 @@
|
|||||||
users.groups.www = {};
|
users.groups.www = {};
|
||||||
services.nginx.group = "www";
|
services.nginx.group = "www";
|
||||||
|
|
||||||
services.goaccess = {
|
|
||||||
enable = false;
|
|
||||||
user = "goaccess";
|
|
||||||
group = "www";
|
|
||||||
dir = "/var/www/goaccess";
|
|
||||||
host = "dash.danilafe.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.danilafe-blog = {
|
services.danilafe-blog = {
|
||||||
enable = true;
|
enable = true;
|
||||||
challengePath = "/var/www/challenges";
|
challengePath = "/var/www/challenges";
|
||||||
|
49
goaccess.nix
49
goaccess.nix
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user