Configure glances
This commit is contained in:
parent
d809ab9fb6
commit
c350b55948
5 changed files with 93 additions and 12 deletions
hosts/nixedo/services/homepage
|
@ -36,9 +36,18 @@ in
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
||||||
customCSS = ''
|
customCSS = ''
|
||||||
|
#information-widgets {
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
padding-right: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
div#footer {
|
div#footer {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.services-group {
|
||||||
|
margin-bottom: 3rem;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services = (import ./services.nix { inherit config lib; });
|
services = (import ./services.nix { inherit config lib; });
|
||||||
|
@ -46,12 +55,13 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
headerStyle = "clean";
|
headerStyle = "clean";
|
||||||
hideVersion = "true";
|
hideVersion = "true";
|
||||||
|
layout = (import ./layout.nix);
|
||||||
statusStyle = "dot";
|
statusStyle = "dot";
|
||||||
};
|
};
|
||||||
|
|
||||||
widgets = import ./widgets.nix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
glances.enable = true;
|
||||||
|
|
||||||
nginx.virtualHosts.${cfg.url} = {
|
nginx.virtualHosts.${cfg.url} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = homelab.baseDomain;
|
useACMEHost = homelab.baseDomain;
|
||||||
|
|
57
hosts/nixedo/services/homepage/glances.nix
Normal file
57
hosts/nixedo/services/homepage/glances.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{ config }:
|
||||||
|
|
||||||
|
{
|
||||||
|
Glances =
|
||||||
|
let
|
||||||
|
port = toString config.services.glances.port;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{
|
||||||
|
Info = {
|
||||||
|
widget = {
|
||||||
|
type = "glances";
|
||||||
|
url = "http://localhost:${port}";
|
||||||
|
metric = "info";
|
||||||
|
chart = false;
|
||||||
|
version = 4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
"CPU Temp" = {
|
||||||
|
widget = {
|
||||||
|
type = "glances";
|
||||||
|
url = "http://localhost:${port}";
|
||||||
|
metric = "sensor:Package id 0";
|
||||||
|
chart = false;
|
||||||
|
version = 4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Processes = {
|
||||||
|
widget = {
|
||||||
|
type = "glances";
|
||||||
|
url = "http://localhost:${port}";
|
||||||
|
metric = "process";
|
||||||
|
chart = false;
|
||||||
|
version = 4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Network = {
|
||||||
|
widget = {
|
||||||
|
type = "glances";
|
||||||
|
url = "http://localhost:${port}";
|
||||||
|
metric = "network:enp0s13f0u1";
|
||||||
|
chart = false;
|
||||||
|
version = 4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
23
hosts/nixedo/services/homepage/layout.nix
Normal file
23
hosts/nixedo/services/homepage/layout.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
Glances = {
|
||||||
|
columns = 4;
|
||||||
|
header = false;
|
||||||
|
style = "row";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Media = {
|
||||||
|
header = true;
|
||||||
|
style = "column";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Services = {
|
||||||
|
header = true;
|
||||||
|
style = "column";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
|
@ -29,4 +29,4 @@ let
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
services
|
services ++ [ (import ./glances.nix { inherit config; }) ]
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
resources = {
|
|
||||||
cpu = true;
|
|
||||||
disk = "/";
|
|
||||||
memory = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]
|
|
Loading…
Add table
Add a link
Reference in a new issue