{ # Example Home Manager configuration for hyprmonitors # Add this to your home.nix or import it as a module imports = [ # Import the hyprmonitors module ./home-manager-module.nix ]; # Enable Hyprland (required for hyprmonitors) wayland.windowManager.hyprland = { enable = true; # Add your Hyprland configuration here }; # Configure hyprmonitors service services.hyprmonitors = { enable = true; # Optional: customize host and port (defaults shown) host = "127.0.0.1"; port = 3000; # Optional: set log level (default: "info") logLevel = "info"; # Optional: add environment variables environmentVariables = { # Example: if you need to set specific Hyprland instance # HYPRLAND_INSTANCE_SIGNATURE = "your-signature-here"; }; # Optional: override the package (if you want to use a custom build) # package = pkgs.hyprmonitors; # Uses default from module }; # The module automatically adds these shell aliases: # - hyprmonitors-start: Start the service # - hyprmonitors-stop: Stop the service # - hyprmonitors-restart: Restart the service # - hyprmonitors-status: Check service status # - hyprmonitors-logs: View service logs # - hyprmonitors-test: Test if the API is responding # The module also adds a hyprmonitors-curl helper script for API testing: # - hyprmonitors-curl health # - hyprmonitors-curl status # - hyprmonitors-curl on [monitor-name] # - hyprmonitors-curl off [monitor-name] # Example of additional Hyprland configuration that works well with hyprmonitors wayland.windowManager.hyprland.settings = { # Your Hyprland config here monitor = [ "DP-1,1920x1080@60,0x0,1" "HDMI-A-1,1920x1080@60,1920x0,1" ]; # Example keybinds for monitor control (optional) bind = [ # Turn all monitors off/on "SUPER SHIFT, M, exec, hyprmonitors-curl off" "SUPER CTRL, M, exec, hyprmonitors-curl on" # Turn specific monitors off/on "SUPER SHIFT, 1, exec, hyprmonitors-curl off DP-1" "SUPER SHIFT, 2, exec, hyprmonitors-curl off HDMI-A-1" "SUPER CTRL, 1, exec, hyprmonitors-curl on DP-1" "SUPER CTRL, 2, exec, hyprmonitors-curl on HDMI-A-1" ]; }; # Optional: Install additional packages that work well with hyprmonitors home.packages = with pkgs; [ curl jq # Add other packages you need ]; }