new service, new drive
This commit is contained in:
parent
7a9f880f6d
commit
b923d7dedf
3 changed files with 39 additions and 1 deletions
|
@ -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" ];
|
||||
};
|
||||
|
|
|
@ -35,6 +35,11 @@ in {
|
|||
enable = true;
|
||||
domain = "amdl.reidlab.pink";
|
||||
};
|
||||
|
||||
uptime = {
|
||||
enable = true;
|
||||
domain = "status.reidlab.pink";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
33
modules/services/uptime.nix
Normal file
33
modules/services/uptime.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue