diff --git a/home/default.nix b/home/default.nix index 59c8610..87565f5 100644 --- a/home/default.nix +++ b/home/default.nix @@ -13,18 +13,24 @@ in ]; config = {}; options.nixfiles = { - standalone = lib.mkOption { + meta.standalone = lib.mkOption { default = isStandalone; description = "Whether or not the home-manager installation is standalone (standalone installations don't have access to osConfig)."; type = lib.types.bool; readOnly = true; internal = true; }; - graphical = lib.mkOption { + meta.graphical = lib.mkOption { description = "Whether to enable graphical home-manager applications"; type = lib.types.bool; default = (osConfig ? services && osConfig.services.xserver.enable); example = true; }; + meta.wayland = lib.mkOption { + description = "Whether to prefer wayland packages and configuration"; + type = lib.types.bool; + default = (lib.hasAttrByPath [ "nixfiles" "meta" "wayland" ] osConfig) && osConfig.nixfiles.meta.wayland; + example = true; + }; }; } diff --git a/system/default.nix b/system/default.nix index 5cd5b92..036f8a4 100644 --- a/system/default.nix +++ b/system/default.nix @@ -14,5 +14,11 @@ in ]; config = {}; options.nixfiles = { + meta.wayland = lib.mkOption { + description = "Whether to prefer wayland applications and configuration"; + default = false; + example = true; + type = lib.types.bool; + }; }; } diff --git a/system/sessions/hyprland.nix b/system/sessions/hyprland.nix index a55ba7d..99e2568 100644 --- a/system/sessions/hyprland.nix +++ b/system/sessions/hyprland.nix @@ -19,6 +19,7 @@ in desktop.enable = true; wm.enable = true; }; + nixfiles.meta.wayland = true; services.xserver.displayManager.sddm.enable = true; diff --git a/system/sessions/plasma.nix b/system/sessions/plasma.nix index 806f58d..fe29e3d 100644 --- a/system/sessions/plasma.nix +++ b/system/sessions/plasma.nix @@ -21,6 +21,7 @@ in services.xserver.desktopManager.plasma5.enable = true; services.xserver.displayManager.defaultSession = "plasmawayland"; programs.kdeconnect.enable = mkDefault true; + nixfiles.meta.wayland = true; systemd.user = { services.restart-xdg-desktop-portal-kde = {