Allow specifying monitors from os config

This commit is contained in:
ItsDrike 2024-06-09 23:08:39 +02:00
parent 6da71787f1
commit 6180f89b72
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
3 changed files with 25 additions and 4 deletions

View file

@ -1,4 +1,9 @@
{ {
osConfig,
...
}: let
cfg = osConfig.myOptions.home-manager.wms.hyprland;
in {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
input = { input = {
# Keyboard layout settings # Keyboard layout settings
@ -20,6 +25,8 @@
natural_scroll = false; natural_scroll = false;
}; };
}; };
monitor = cfg.monitor;
}; };
} }

View file

@ -85,7 +85,12 @@
key = "FA2745890B7048C0"; key = "FA2745890B7048C0";
}; };
}; };
wms.hyprland.enable = true; wms.hyprland = {
enable = true;
monitor = [
"eDP-1, 1920x1080@60, 0x0, 1"
];
};
}; };
}; };
} }

View file

@ -6,10 +6,19 @@
inherit (lib) mkEnableOption mkOption types; inherit (lib) mkEnableOption mkOption types;
in { in {
options.myOptions.home-manager.wms = { options.myOptions.home-manager.wms = {
hyprland.enable = mkEnableOption '' hyprland = {
enable = mkEnableOption ''
Hyprland wayland compositor. Hyprland wayland compositor.
''; '';
monitor = mkOption {
type = types.listOf types.str;
default = [];
description = "Monitor configuration.";
};
};
isWayland = mkOption { isWayland = mkOption {
type = types.bool; type = types.bool;
default = with config.myOptions.home-manager.wms; (hyprland.enable); default = with config.myOptions.home-manager.wms; (hyprland.enable);