diff --git a/hardware/work.nix b/hardware/work.nix index 9a30e05..2a7759d 100644 --- a/hardware/work.nix +++ b/hardware/work.nix @@ -95,15 +95,11 @@ ]; displays.displays = { - "hp" = { - name = "DP-1"; - wallpaper = ../images/demonslayer.png; - workspaces = { - start = 6; - end = 10; - }; - }; "asus" = { + enable = false; + }; + "hp" = { + enable = true; name = "HDMI-A-1"; wallpaper = ../images/nier2.jpg; workspaces = { @@ -112,6 +108,7 @@ }; }; "internal" = { + enable = true; name = "eDP-1"; description = "BOE 0x07D8"; workspaces = { diff --git a/hardware/zenix.nix b/hardware/zenix.nix index c14425f..d8d0fc6 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -105,6 +105,7 @@ displays = { displays."hp" = { + enable = true; name = "DP-1"; wallpaper = ../images/demonslayer.png; workspaces = { @@ -113,6 +114,7 @@ }; }; displays."asus" = { + enable = true; name = "HDMI-A-1"; wallpaper = ../images/nier2.jpg; workspaces = { diff --git a/lib/modules/display.nix b/lib/modules/display.nix index 40cb39a..e4845dc 100644 --- a/lib/modules/display.nix +++ b/lib/modules/display.nix @@ -7,7 +7,7 @@ with lib; let cfg = config.displays; - renderDisplaysForHyprland = displays: (map displayHyprlandSetting displays); + renderDisplaysForHyprland = displays: (map displayHyprlandSetting (builtins.filter (d: d.enable) displays )); displayHyprlandSetting = display: specificDisplay display @@ -91,8 +91,10 @@ with lib; let displayType = types.submodule { options = { + enable = mkEnableOption "enable this display"; name = mkOption { description = "name of the display"; + default = ""; }; description = mkOption { description = "description of display from hyprctl monitors"; @@ -129,9 +131,11 @@ with lib; let options = { start = mkOption { type = types.int; + default = 1; }; end = mkOption { type = types.int; + default = 1; }; }; }; diff --git a/lib/modules/wayland.nix b/lib/modules/wayland.nix index 7c07049..5696502 100644 --- a/lib/modules/wayland.nix +++ b/lib/modules/wayland.nix @@ -33,6 +33,12 @@ in { home-manager.users.${user}.imports = [ { + xdg.portal = { + enable = true; + config.common.default = ["hyprland"]; + extraPortals = if cfg.hyprland then [ pkgs.xdg-desktop-portal-hyprland ] else if cfg.sway then [ pkgs.xdg-desktop-portal-sway ] else []; + }; + wayland.windowManager.hyprland = mkIf cfg.hyprland { enable = true; systemd.enable = true;