update nas

This commit is contained in:
mjallen18
2024-06-06 13:04:05 -05:00
parent b5a52ee878
commit 32ac294b08
2 changed files with 117 additions and 96 deletions

View File

@@ -330,7 +330,26 @@ in
hostId = "4b501480";
# Enable Network Manager
networkmanager.enable = true;
networkmanager.enable = false;
interfaces = {
wlp6s0.ipv4.addresses = [ {
address = "10.0.1.18";
prefixLength = 24;
} ];
};
defaultGateway.address = "10.0.1.1";
nameservers = [ "10.0.1.1" ];
wireless = {
enable = true;
networks = {
"Joeys Jungle" = {
psk = "kR8v&3Qd";
};
};
};
firewall = {
enable = true;
@@ -343,9 +362,9 @@ in
# Configure environment
environment = {
# etc."nut/upsd.conf".source = ./upsd.conf;
# etc."nut/upsd.users".source = ./upsd.users;
# etc."nut/upsmon.conf".source = ./upsmon.conf;
etc."nut/upsd.conf".source = /root/upsd.conf;
etc."nut/upsd.users".source = /root/upsd.users;
etc."nut/upsmon.conf".source = /root/upsmon.conf;
# List packages installed in system profile. To search, run:
# $ nix search wget
@@ -392,49 +411,51 @@ in
nix-ld.enable = true;
};
power.ups.ups = {
enable = enableUps;
mode = "netserver";
ups."nasups" = {
driver = "usbhid-ups";
port = "auto";
description = "NAS UPS";
};
upsmon = {
monitor = "nasups@localhost 1 upsuser BogieDudie1 primary";
};
upsd = {
enable = true;
listen = {
address = 0.0 0.0 0.0;
port = 3493;
power.ups = {
ups = {
enable = enableUps;
mode = "netserver";
ups."nasups" = {
driver = "usbhid-ups";
port = "auto";
description = "NAS UPS";
};
upsmon = {
monitor = "nasups@localhost 1 upsuser BogieDudie1 primary";
};
upsd = {
enable = true;
listen = {
address = 0.0 0.0 0.0;
port = 3493;
};
};
users = {
actions = [ "SET" ];
instcmds = [ "ALL" ];
upsmon = "primary";
passwordFile = "/root/ups.conf";
};
};
users = {
actions = [ "SET" ];
instcmds = [ "ALL" ];
upsmon = "primary";
passwordFile = "/root/ups.conf";
# Add UPS monitoring service
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;
};
};
};
# Add UPS monitoring service
# 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 = {
overlays = [ outputs.overlays.nixpkgs-unstable ];