style(self_host/glances): moving to prepare grafana/prometheus
This commit is contained in:
parent
0c1fd449ad
commit
6e2a2670e5
3 changed files with 29 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
service = {
|
service = {
|
||||||
selfhost = {
|
selfhost = {
|
||||||
|
htop = true;
|
||||||
monitor = true;
|
monitor = true;
|
||||||
nextcloud = true;
|
nextcloud = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ inputs, config, pkgs, lib, ... }:
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
htop = import ./self_host/htop.nix {
|
||||||
|
inherit inputs config pkgs lib;
|
||||||
|
};
|
||||||
monitor = import ./self_host/monitor.nix {
|
monitor = import ./self_host/monitor.nix {
|
||||||
inherit inputs config pkgs lib;
|
inherit inputs config pkgs lib;
|
||||||
};
|
};
|
||||||
|
|
@ -12,6 +15,7 @@ in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
nextcloud
|
nextcloud
|
||||||
|
htop
|
||||||
monitor
|
monitor
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -21,6 +25,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
options.service.selfhost = {
|
options.service.selfhost = {
|
||||||
|
htop = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable the htop";
|
||||||
|
};
|
||||||
monitor = lib.mkOption {
|
monitor = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
|
||||||
19
services/self_host/htop.nix
Normal file
19
services/self_host/htop.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.service.selfhost.monitor;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
glances.enable = true;
|
||||||
|
|
||||||
|
nginx.virtualHosts."htop.enium.eu" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:61208";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue