Files
Olympus/home-manager/nathan/programs/hyprland/default.nix
2025-08-12 09:54:57 -05:00

44 lines
1.3 KiB
Nix

{ config, lib, pkgs, ... }: {
options.homeconfig.hyprland.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.hyprland.enable {
home.sessionVariables.NIX_OZONE_WL = "1";
programs.kitty.enable = lib.mkDefault true;
home.packages = with pkgs; [
pyprland
];
wayland.windowManager.hyprland = {
enable = true;
systemd = {
enable = true;
variables = [ "--all" ];
};
extraConfig = let
monitor = if config.homeconfig.host == "laptop" then ''
monitor=eDP-1,1920x1080@60,0x0,1
'' else if config.homeconfig.host == "homebox" then ''
monitor=HDMI-A-2,1920x1080@60,0x0,1
monitor=HEADLESS-2,1920x1080@60,0x0,1
exec-once=hyprctl output create headless HEADLESS-2
exec-once=hyprctl keyword monitor HDMI-A-2,disable
exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2
'' else '''';
in monitor + ''
source = /home/nathan/.config/hypr/main.conf
'';
};
};
}