update nas docker stuff

This commit is contained in:
mjallen18
2024-05-14 11:21:06 -05:00
parent 4c1a95d864
commit 840c7a183c
6 changed files with 208 additions and 20 deletions

View File

@@ -11,7 +11,7 @@ let
allowedPorts = [ 2342 3493 61208 9090 ];
enableDisplayManager = false;
# adding a flag cause nixos cant figure itself out and broke shit that cant be fixed
enableUps = false;
enableUps = true;
in {
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
@@ -29,9 +29,11 @@ in {
};
};
powerManagement.cpuFreqGovernor = "powersave";
nas-apps = {
jackett.enable = true;
jellyfin.enable = true;
jellyseerr.enable = true;
@@ -61,6 +63,8 @@ in {
vscode.enable = true;
swag.enable = true;
deluge.enable = true;
};
nas-samba = {
@@ -127,7 +131,7 @@ in {
# Override kernel to latest
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
kernelParams = [ "nohibernate" ];
kernelParams = [ "nohibernate" "amd_pstate=active" ];
consoleLogLevel = 3;
bootspec.enable = true;
@@ -332,6 +336,9 @@ in {
packagekit
gnome.gnome-packagekit
unstable.nix-inspect
unstable.gpt4all
lm_sensors
htop
];
};
@@ -342,7 +349,7 @@ in {
nix-ld.enable = true;
};
power.ups = {
power.ups.ups = {
enable = enableUps;
mode = "netserver";
ups."nasups" = {
@@ -350,24 +357,40 @@ in {
port = "auto";
description = "NAS UPS";
};
upsmon = {
monitor = "nasups@localhost 1 upsuser BogieDudie1 primary";
};
upsd = {
enable = true;
listen = {
address = 0.0.0.0;
port = 3493;
};
};
users = {
actions = [ "SET" ];
instcmds = [ "ALL" ];
upsmon = "primary";
passwordFile = "/root/ups.conf";
};
};
# Add UPS monitoring service
# services.upsmon = {
# enable = true;
# # Configure UPS device
# device = "/dev/usb/hiddev1"; # Change this to your UPS device
# driver = "usbhid-ups"; # Change this if your UPS uses a different driver
# # Set UPS monitoring options
# options = {
# # NOTIFYCMD = "/path/to/notify-script.sh"; # Path to your notification script
# POLLFREQ = 5;
# POLLFREQALERT = 5;
# HOSTSYNC = "on";
# DEADTIME = 15;
# FINALDELAY = 5;
# };
# };
# power.upsmon = {
# enable = true;
# # Configure UPS device
# device = "/dev/usb/hiddev1"; # Change this to your UPS device
# driver = "usbhid-ups"; # Change this if your UPS uses a different driver
# # Set UPS monitoring options
# options = {
# # NOTIFYCMD = "/path/to/notify-script.sh"; # Path to your notification script
# POLLFREQ = 5;
# POLLFREQALERT = 5;
# HOSTSYNC = "on";
# DEADTIME = 15;
# FINALDELAY = 5;
# };
# };
# Configure nixpkgs
nixpkgs = {