feat(selfhost/glances): adding a monitor to my server
This commit is contained in:
parent
e881327e72
commit
0c1fd449ad
4 changed files with 35 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
service = {
|
service = {
|
||||||
selfhost = {
|
selfhost = {
|
||||||
|
monitor = true;
|
||||||
nextcloud = true;
|
nextcloud = true;
|
||||||
};
|
};
|
||||||
forty_two.irc = true;
|
forty_two.irc = true;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ inputs, config, pkgs, lib, ... }:
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
monitor = import ./self_host/monitor.nix {
|
||||||
|
inherit inputs config pkgs lib;
|
||||||
|
};
|
||||||
nextcloud = import ./self_host/nextcloud.nix {
|
nextcloud = import ./self_host/nextcloud.nix {
|
||||||
inherit inputs config pkgs lib;
|
inherit inputs config pkgs lib;
|
||||||
};
|
};
|
||||||
|
|
@ -9,6 +12,7 @@ in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
nextcloud
|
nextcloud
|
||||||
|
monitor
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -17,6 +21,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
options.service.selfhost = {
|
options.service.selfhost = {
|
||||||
|
monitor = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable the monitor";
|
||||||
|
};
|
||||||
nextcloud = lib.mkOption {
|
nextcloud = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
|
||||||
19
services/self_host/monitor.nix
Normal file
19
services/self_host/monitor.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.service.selfhost.monitor;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
glances.enable = true;
|
||||||
|
|
||||||
|
nginx.virtualHosts."monitor.enium.eu" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:61208";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -20,6 +20,12 @@ in
|
||||||
adminuser = "OwnedByTheEniumTeam";
|
adminuser = "OwnedByTheEniumTeam";
|
||||||
dbtype = "sqlite";
|
dbtype = "sqlite";
|
||||||
};
|
};
|
||||||
|
settings = {
|
||||||
|
trusted_domains = [
|
||||||
|
"192.168.1.254"
|
||||||
|
];
|
||||||
|
default_phone_region = "FR";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
nginx.virtualHosts."nextcloud.enium.eu".enableACME = true;
|
nginx.virtualHosts."nextcloud.enium.eu".enableACME = true;
|
||||||
nginx.virtualHosts."nextcloud.enium.eu".forceSSL = true;
|
nginx.virtualHosts."nextcloud.enium.eu".forceSSL = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue