feat(configurations): use host config for monitor settings
This commit is contained in:
parent
79c7e495c8
commit
782bbcbaa3
3 changed files with 25 additions and 22 deletions
|
@ -65,6 +65,7 @@ in
|
|||
pkgs,
|
||||
config,
|
||||
hostName,
|
||||
hostConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -250,17 +251,20 @@ in
|
|||
# Null the packages since we use them system wide
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
# settings.monitor = [
|
||||
# "${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
|
||||
# ];
|
||||
|
||||
settings = mkMerge [
|
||||
(import ./_hyprland/decoration.nix)
|
||||
(import ./_hyprland/keybinds.nix { inherit pkgs; })
|
||||
{
|
||||
ecosystem.no_update_news = true;
|
||||
xwayland.force_zero_scaling = true;
|
||||
monitor = [ ", preferred, auto, 1" ];
|
||||
monitor =
|
||||
let
|
||||
mainMonitor = hostConfig.machine.monitors.main;
|
||||
in
|
||||
[
|
||||
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
|
||||
", preferred, auto, 1"
|
||||
];
|
||||
exec-once = [
|
||||
"uwsm app -- $LOCKSCREEN"
|
||||
"uwsm app -- $NOTIFICATION_DAEMON"
|
||||
|
|
|
@ -14,14 +14,12 @@
|
|||
platform = "amd";
|
||||
gpu = "nvidia";
|
||||
root.drive = "/dev/disk/by-id/nvme-CT2000P3SSD8_2325E6E77434";
|
||||
monitors = [
|
||||
{
|
||||
id = "desc:OOO AN-270W04K";
|
||||
scale = "2";
|
||||
resolution = "3840x2160";
|
||||
refresh-rate = "60";
|
||||
}
|
||||
];
|
||||
monitors.main = {
|
||||
id = "desc:OOO AN-270W04K";
|
||||
resolution = "3840x2160";
|
||||
refresh-rate = "60";
|
||||
scale = "2";
|
||||
};
|
||||
};
|
||||
extraCfg.server.web-apps = {
|
||||
comfy-ui.enable = true;
|
||||
|
|
19
nix/meta.nix
19
nix/meta.nix
|
@ -8,7 +8,6 @@ let
|
|||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (cfg.lib.options) mkStrOption;
|
||||
inherit (lib.types)
|
||||
listOf
|
||||
path
|
||||
lazyAttrsOf
|
||||
raw
|
||||
|
@ -18,6 +17,14 @@ let
|
|||
inherit (inputs.flake-parts.lib) mkSubmoduleOptions;
|
||||
inherit (cfg.lib.attrsets) firstAttrNameMatching;
|
||||
cfg = config.flake;
|
||||
monitorOpts = submodule {
|
||||
options = {
|
||||
id = mkStrOption "";
|
||||
resolution = mkStrOption "";
|
||||
refresh-rate = mkStrOption "";
|
||||
scale = mkStrOption "";
|
||||
};
|
||||
};
|
||||
userOpts = submodule {
|
||||
options = {
|
||||
username = mkStrOption "";
|
||||
|
@ -36,14 +43,8 @@ let
|
|||
gpu = mkStrOption "";
|
||||
root.drive = mkStrOption "";
|
||||
monitors = mkOption {
|
||||
type = listOf submodule {
|
||||
options = {
|
||||
id = mkStrOption "";
|
||||
scale = mkStrOption "";
|
||||
resolution = mkStrOption "";
|
||||
refresh-rate = mkStrOption "";
|
||||
};
|
||||
};
|
||||
type = lazyAttrsOf monitorOpts;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
extraCfg = mkOption {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue