diff --git a/users/guanranwang/home-manager/applications/bspwm/default.nix b/users/guanranwang/home-manager/applications/bspwm/default.nix index e305cad..a435020 100644 --- a/users/guanranwang/home-manager/applications/bspwm/default.nix +++ b/users/guanranwang/home-manager/applications/bspwm/default.nix @@ -1,5 +1,6 @@ {pkgs, ...}: { imports = [ + ../common/wm.nix ../dunst ../picom ../polybar diff --git a/users/guanranwang/home-manager/applications/common/wayland.nix b/users/guanranwang/home-manager/applications/common/wayland.nix new file mode 100644 index 0000000..c0b978a --- /dev/null +++ b/users/guanranwang/home-manager/applications/common/wayland.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.sessionVariables = { + NIXOS_OZONE_WL = "1"; # let electron applications use wayland + }; + + home.packages = with pkgs; [ + wl-clipboard + ]; +} diff --git a/users/guanranwang/home-manager/applications/common/wm.nix b/users/guanranwang/home-manager/applications/common/wm.nix new file mode 100644 index 0000000..c294800 --- /dev/null +++ b/users/guanranwang/home-manager/applications/common/wm.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + pavucontrol + ]; + + dconf.settings = { + "org/gnome/desktop/wm/preferences" = { + "button-layout" = "icon,appmenu:"; # remove csd window buttons + }; + }; +} diff --git a/users/guanranwang/home-manager/applications/hyprland/default.nix b/users/guanranwang/home-manager/applications/hyprland/default.nix index 65dc7b7..0d71085 100644 --- a/users/guanranwang/home-manager/applications/hyprland/default.nix +++ b/users/guanranwang/home-manager/applications/hyprland/default.nix @@ -4,6 +4,8 @@ ... }: { imports = [ + ../common/wayland.nix + ../common/wm.nix ../cliphist ../dunst ../rofi @@ -17,7 +19,6 @@ home.sessionVariables = { QT_IM_MODULE = lib.mkForce "wayland"; # use text-input-v2 GTK_IM_MODULE = lib.mkForce "wayland"; # use text-input-v3 - NIXOS_OZONE_WL = "1"; # let electron applications use wayland }; wayland.windowManager.hyprland = { diff --git a/users/guanranwang/home-manager/applications/sway/default.nix b/users/guanranwang/home-manager/applications/sway/default.nix index f04a706..d40be5d 100644 --- a/users/guanranwang/home-manager/applications/sway/default.nix +++ b/users/guanranwang/home-manager/applications/sway/default.nix @@ -5,6 +5,8 @@ ... }: { imports = [ + ../common/wayland.nix + ../common/wm.nix ../cliphist ../dunst ../rofi @@ -16,30 +18,8 @@ home.sessionVariables = { GTK_IM_MODULE = lib.mkForce "wayland"; # use text-input-v3 - NIXOS_OZONE_WL = "1"; # let electron applications use wayland }; - dconf.settings = { - "org/gnome/desktop/wm/preferences" = { - "button-layout" = "icon,appmenu:"; # remove csd window buttons - }; - }; - - home.packages = with pkgs; [ - pamixer - brightnessctl - playerctl - pavucontrol - wl-clipboard - cliphist - grim - slurp - swappy - #mpvpaper - libnotify - jq - ]; - wayland.windowManager.sway = { enable = true; extraOptions = ["--unsupported-gpu" "-Dnoscanout"]; diff --git a/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/default.nix b/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/default.nix index 27d78dc..0689e93 100644 --- a/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/default.nix +++ b/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/default.nix @@ -1,6 +1,18 @@ {pkgs, ...}: let binPATH = ".local/bin"; in { + home.packages = with pkgs; [ + pamixer + brightnessctl + grim + slurp + swappy + jq + #mpvpaper + #swww + libnotify + dunst + ]; home.sessionPath = ["$HOME/${binPATH}"]; home.file = builtins.mapAttrs (_name: value: value // {executable = true;}) { ${binPATH} = {