From 037ef27243eab47d6e1c29f231c248dc2aa4966e Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Mon, 4 Mar 2024 14:54:25 +0300 Subject: 2024-03-04 --- modules/nixos/profiles/headful.nix | 2 +- modules/nixos/wayland.nix | 8 ++------ modules/nixos/x11.nix | 21 +++++++++------------ 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/modules/nixos/profiles/headful.nix b/modules/nixos/profiles/headful.nix index 4bc7ed3..d8e1699 100644 --- a/modules/nixos/profiles/headful.nix +++ b/modules/nixos/profiles/headful.nix @@ -20,7 +20,7 @@ in { kde.enable = mkDefault true; xmonad.enable = mkDefault false; - # Potentially remove in favor of Wayland in the future. + wayland.enable = mkDefault true; x11.enable = mkDefault true; }; diff --git a/modules/nixos/wayland.nix b/modules/nixos/wayland.nix index 5068c25..b64ab32 100644 --- a/modules/nixos/wayland.nix +++ b/modules/nixos/wayland.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, ... }: with lib; let @@ -9,11 +10,6 @@ in { options.nixfiles.modules.wayland.enable = mkEnableOption "Wayland"; config = mkIf cfg.enable { - assertions = [ - { - assertion = !config.nixfiles.modules.x11.enable; - message = "Pick only one!"; - } - ]; + hm.home.packages = with pkgs; [wl-clipboard]; }; } diff --git a/modules/nixos/x11.nix b/modules/nixos/x11.nix index bd35d87..52420db 100644 --- a/modules/nixos/x11.nix +++ b/modules/nixos/x11.nix @@ -10,19 +10,16 @@ in { options.nixfiles.modules.x11.enable = mkEnableOption "X11"; config = mkIf cfg.enable { - assertions = [ - { - assertion = !config.nixfiles.modules.wayland.enable; - message = "Pick only one!"; - } - ]; - hm = { - home.sessionVariables = { - XCOMPOSEFILE = pkgs.writeText "XCompose" '' - include "${pkgs.xorg.libX11}/share/X11/locale/en_US.UTF-8/Compose" - ''; - XCOMPOSECACHE = "${config.dirs.cache}/libx11/compose"; + home = { + sessionVariables = { + XCOMPOSEFILE = pkgs.writeText "XCompose" '' + include "${pkgs.xorg.libX11}/share/X11/locale/en_US.UTF-8/Compose" + ''; + XCOMPOSECACHE = "${config.dirs.cache}/libx11/compose"; + }; + + packages = with pkgs; [xclip]; }; xresources.properties = { -- cgit v1.2.3