diff --git a/AGENTS.md b/AGENTS.md index 8aa9e002..b3c18040 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,3 +7,4 @@ Before making changes, read the appropriate entries of the following manuals: Do not read the entire manual at once, instead search only for what you need. After editing nix configurations, always run `nix flake check nixos/` to check for errors. +Do NOT attempt to rebuild the system, let the user handle that. diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 64914079..5afb71ff 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -140,6 +140,29 @@ # Set up virtualisation virtualisation.libvirtd.enable = true; + # UPS (Green Cell 2000VA) + power.ups = { + enable = true; + mode = "standalone"; + ups.greencell = { + driver = "nutdrv_qx"; + port = "auto"; + description = "Green Cell UPS 2000VA"; + directives = [ + "vendorid = 0001" + "productid = 0000" + ]; + }; + users.upsmon = { + passwordFile = "${pkgs.writeText "upsmon-password" "upsmonpass"}"; + upsmon = "primary"; + instcmds = [ "ALL" ]; + }; + upsmon.monitor.greencell = { + user = "upsmon"; + }; + }; + # Open ports in the firewall. networking.firewall.enable = true; networking.firewall.allowedTCPPorts = [ 11434 ]; # LMStudio (must be manually configured) diff --git a/nixos/home.nix b/nixos/home.nix index f09d1c30..891d66e9 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -48,6 +48,7 @@ switcheroo wordbook textpieces + gnome-sound-recorder # Virtualisation gnome-boxes # VM management diff --git a/openclaw/flake.nix b/openclaw/flake.nix index 11c1ae79..0e45d01d 100644 --- a/openclaw/flake.nix +++ b/openclaw/flake.nix @@ -24,27 +24,13 @@ pkgs.openclaw-gateway pkgs.openclaw-tools pkgs.trash-cli - pkgs.ollama ]; shellHook = '' - # Start ollama service if not already running - if ! pgrep -x "ollama" > /dev/null; then - echo "Starting ollama service..." - ollama serve &>/dev/null & - sleep 2 - fi - - # Pull model if needed (runs in background) - if ! ollama list 2>/dev/null | grep -q "llama3.2:3b"; then - echo "Pulling llama3.2:3b model (running in background)..." - ollama pull llama3.2:3b & - fi - # Start openclaw-gateway if not already running (uses ~/.openclaw config) if ! pgrep -f "openclaw-gateway" > /dev/null; then echo "Starting openclaw-gateway..." - openclaw gateway &>/dev/null & + openclaw gateway & sleep 1 fi