fix(selfhost): now really use the boolean of the function

This commit is contained in:
Raphael 2025-07-04 03:04:32 +02:00
parent c212d0c671
commit 62d63e139b
4 changed files with 164 additions and 156 deletions

View file

@ -4,6 +4,7 @@ let
cfg = config.service.selfhost.monitor; cfg = config.service.selfhost.monitor;
in in
{ {
config = lib.mkIf cfg {
services = { services = {
glances.enable = true; glances.enable = true;
@ -16,4 +17,5 @@ in
}; };
}; };
}; };
};
} }

View file

@ -5,7 +5,8 @@ let
monitored = [ "nginx" "grafana" ]; monitored = [ "nginx" "grafana" ];
email = "raphael@enium.eu"; email = "raphael@enium.eu";
in in
{ {
config = lib.mkIf cfg {
services.grafana = { services.grafana = {
enable = true; enable = true;
package = pkgs.grafana; package = pkgs.grafana;
@ -165,4 +166,5 @@ groups:
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
} };
}

View file

@ -5,6 +5,7 @@ let
dataDir = "/mnt/data/nextcloud"; dataDir = "/mnt/data/nextcloud";
in in
{ {
config = lib.mkIf cfg {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
php php
]; ];
@ -33,4 +34,5 @@ in
fastcgi_pass unix:/run/phpfpm-nextcloud.sock; fastcgi_pass unix:/run/phpfpm-nextcloud.sock;
''; '';
}; };
};
} }

View file

@ -4,6 +4,7 @@ let
cfg = config.service.selfhost.ollama; cfg = config.service.selfhost.ollama;
in in
{ {
config = lib.mkIf cfg {
services = { services = {
ollama = { ollama = {
enable = true; enable = true;
@ -26,4 +27,5 @@ in
}; };
}; };
}; };
};
} }