mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-27 06:10:53 +01:00
Merge branch 'main' of github.com:JulienMalka/nix-config
This commit is contained in:
commit
f43552916f
3 changed files with 19 additions and 10 deletions
|
@ -15,7 +15,6 @@ in
|
|||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = inputs.homepage;
|
||||
default = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."www.julienmalka.me" = {
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
http, 200, Homepage, https://julienmalka.me
|
||||
http, 200, CI, https://ci.julienmalka.me
|
||||
ping, 0, Newton, newton.julienmalka.me
|
||||
|
||||
http, 200, Lisa, https://google.com
|
||||
http, 200, Homepage, https://julienmalka.me
|
||||
http, 200, CI, https://ci.julienmalka.me
|
||||
http, 200, Jellyfin, https://tv.julienmalka.me
|
||||
http, 200, Transmission, https://downloads.julienmalka.me
|
||||
http, 200, Sonarr, https://series.julienmalka.me
|
||||
http, 200, Radarr, https://films.julienmalka.me
|
||||
http, 200, Jackett, https://jackett.julienmalka.me/UI/Dashboard
|
||||
port, 0, Newton, newton.julienmalka.me 45
|
||||
http, 200, Cloud, cloud.julienmalka.me
|
||||
|
|
|
|
@ -5,7 +5,7 @@ let
|
|||
in
|
||||
{
|
||||
|
||||
options.luj.jackett = {
|
||||
options.luj.status = {
|
||||
enable = mkEnableOption "activate status page";
|
||||
nginx.enable = mkEnableOption "activate nginx";
|
||||
nginx.subdomain = mkOption {
|
||||
|
@ -16,16 +16,20 @@ in
|
|||
config = mkIf cfg.enable (
|
||||
mkMerge [{
|
||||
systemd = {
|
||||
timers.simple-timer = {
|
||||
timers.tinystatus = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "tinystatus.service" ];
|
||||
timerConfig.OnCalendar = "minutely";
|
||||
timerConfig.OnCalendar = "*-*-* *:05,10,15,20,25,30,35,40,45,50,55:00";
|
||||
timerConfig.Unit = "tinystatus.service";
|
||||
};
|
||||
services.tinystatus = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
path = [ pkgs.gawk pkgs.gnused pkgs.curl pkgs.netcat pkgs.unixtools.ping ];
|
||||
script = ''
|
||||
mkdir -p /var/www/status
|
||||
${pkgs.tinystatus}/bin/tinystatus ${./checks.csv} > /var/www/status/index.html
|
||||
mkdir -p /var/www/status
|
||||
${pkgs.tinystatus}/bin/tinystatus ${./checks.csv} > /var/www/status/index.html
|
||||
${pkgs.gnused}/bin/sed -i 's/tinystatus/Services status/g' /var/www/status/index.html
|
||||
${pkgs.gnused}/bin/sed -i 's/80%/60%/g' /var/www/status/index.html
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue