new service, new drive
This commit is contained in:
parent
7a9f880f6d
commit
ff1b975552
4 changed files with 43 additions and 3 deletions
|
@ -46,7 +46,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
system.stateVersion = mkDefault "23.11";
|
||||
system.stateVersion = mkDefault "25.11";
|
||||
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
||||
|
||||
boot = {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# use better power management for a device that's always on
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
@ -24,11 +24,13 @@
|
|||
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" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
|
|
|
@ -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