new service, new drive

This commit is contained in:
Reid 2025-06-01 17:37:53 -07:00
parent 7a9f880f6d
commit b923d7dedf
3 changed files with 39 additions and 1 deletions

View file

@ -24,7 +24,7 @@
boot.loader.generic-extlinux-compatible.enable = true;
fileSystems."/" =
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
{ device = "/dev/disk/by-uuid/27851c93-5389-4fcb-abe0-5372b1190bc4";
fsType = "ext4";
options = [ "noatime" "nodiratime" "discard" ];
};

View file

@ -35,6 +35,11 @@ in {
enable = true;
domain = "amdl.reidlab.pink";
};
uptime = {
enable = true;
domain = "status.reidlab.pink";
};
};
};

View file

@ -0,0 +1,33 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.modules.services.uptime;
in {
options.modules.services.uptime = {
enable = mkEnableOption "enable uptime kuma, a self-hosted uptime website";
port = mkOption {
type = types.int;
default = 3002;
};
domain = mkOption {
type = types.str;
default = "status.reidlab.pink";
};
};
config = mkIf cfg.enable {
services.uptime-kuma = {
enable = true;
settings.PORT = toString cfg.port;
};
services.nginx.virtualHosts."${cfg.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
};
};
};
}