From 02e8a0cd62dc212fe63286e9a8990ace58c7ab4d Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 12 Apr 2023 23:29:58 +0100 Subject: [PATCH] Split hypr config into machine-specific components --- nixos/home-manager/env/common-wayland.nix | 2 ++ .../env/config/hypr/hyprland-H0615.conf | 13 ++++++++++ .../env/config/hypr/hyprland-vanguard.conf | 10 ++++++++ .../env/config/hypr/hyprland.conf | 24 +++++-------------- .../{hyprpaper.conf => hyprpaper-H0615.conf} | 3 +-- .../env/config/hypr/hyprpaper-northstar.conf | 4 ++++ .../env/config/hypr/hyprpaper-vanguard.conf | 3 +++ .../home-manager/env/config/waybar/style.css | 2 +- nixos/home-manager/env/hyprland.nix | 10 +------- nixos/home-manager/env/sway.nix | 8 +------ nixos/home-manager/ukaea-elitherl.nix | 5 ++++ nixos/home-manager/vanguard-xenia.nix | 17 +++++-------- nixos/vanguard-xenia.nix | 3 +-- 13 files changed, 54 insertions(+), 50 deletions(-) create mode 100644 nixos/home-manager/env/config/hypr/hyprland-H0615.conf create mode 100644 nixos/home-manager/env/config/hypr/hyprland-vanguard.conf rename nixos/home-manager/env/config/hypr/{hyprpaper.conf => hyprpaper-H0615.conf} (70%) create mode 100644 nixos/home-manager/env/config/hypr/hyprpaper-northstar.conf create mode 100644 nixos/home-manager/env/config/hypr/hyprpaper-vanguard.conf diff --git a/nixos/home-manager/env/common-wayland.nix b/nixos/home-manager/env/common-wayland.nix index 6c90115a..977a6139 100644 --- a/nixos/home-manager/env/common-wayland.nix +++ b/nixos/home-manager/env/common-wayland.nix @@ -7,6 +7,8 @@ ]; home.packages = with pkgs; [ swayimg + hyprpaper + dolphin jq socat ]; diff --git a/nixos/home-manager/env/config/hypr/hyprland-H0615.conf b/nixos/home-manager/env/config/hypr/hyprland-H0615.conf new file mode 100644 index 00000000..4fde2526 --- /dev/null +++ b/nixos/home-manager/env/config/hypr/hyprland-H0615.conf @@ -0,0 +1,13 @@ +monitor=HDMI-A-1,preferred,auto,auto +monitor=DP-1,preferred,auto,auto,transform,1 + +exec-once=hyprpaper -c ~/.dotfiles/nixos/home-manager/env/config/hypr/hyprpaper-H0615.conf + +wsbind=1,HDMI-A-1 +wsbind=2,HDMI-A-1 +wsbind=3,HDMI-A-1 +wsbind=4,HDMI-A-1 +wsbind=5,HDMI-A-1 +wsbind=6,HDMI-A-1 +wsbind=7,HDMI-A-1 +wsbind=8,HDMI-A-1 diff --git a/nixos/home-manager/env/config/hypr/hyprland-vanguard.conf b/nixos/home-manager/env/config/hypr/hyprland-vanguard.conf new file mode 100644 index 00000000..16176168 --- /dev/null +++ b/nixos/home-manager/env/config/hypr/hyprland-vanguard.conf @@ -0,0 +1,10 @@ +device:logitech-usb-receiver-mouse { + left_handed = yes +} + +misc { + vrr = 2 +} + +monitor=DP-1,highrr,auto,1 +exec-once=hyprpaper -c ~/.dotfiles/nixos/home-manager/env/config/hypr/hyprpaper-vanguard.conf diff --git a/nixos/home-manager/env/config/hypr/hyprland.conf b/nixos/home-manager/env/config/hypr/hyprland.conf index 63e4dc95..62187b9a 100644 --- a/nixos/home-manager/env/config/hypr/hyprland.conf +++ b/nixos/home-manager/env/config/hypr/hyprland.conf @@ -1,14 +1,13 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ -#monitor=,preferred,auto,auto -monitor=HDMI-A-1,preferred,auto,auto -monitor=DP-1,preferred,auto,auto,transform,1 - +monitor=,preferred,auto,auto # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch # exec-once = waybar & hyprpaper & firefox -exec-once = dunst & hyprpaper -c ~/.dotfiles/nixos/home-manager/env/config/hypr/hyprpaper.conf & waybar -c ~/.dotfiles/nixos/home-manager/env/config/waybar/config-hyprland & eww daemon +exec-once = dunst +exec-once = waybar -c ~/.dotfiles/nixos/home-manager/env/config/waybar/config-hyprland +exec-once = eww daemon # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf @@ -93,10 +92,8 @@ gestures { workspace_swipe = off } -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more -device:epic-mouse-v1 { - sensitivity = -0.5 +misc { + disable_autoreload = yes } # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more @@ -112,15 +109,6 @@ windowrule = workspace 6, ^(Steam)$ windowrule = workspace 7, ^(Bitwarden)$ windowrule = workspace 8, ^(Nxplayer.bin)$ -wsbind=1,HDMI-A-1 -wsbind=2,HDMI-A-1 -wsbind=3,HDMI-A-1 -wsbind=4,HDMI-A-1 -wsbind=5,HDMI-A-1 -wsbind=6,HDMI-A-1 -wsbind=7,HDMI-A-1 -wsbind=8,HDMI-A-1 - # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER diff --git a/nixos/home-manager/env/config/hypr/hyprpaper.conf b/nixos/home-manager/env/config/hypr/hyprpaper-H0615.conf similarity index 70% rename from nixos/home-manager/env/config/hypr/hyprpaper.conf rename to nixos/home-manager/env/config/hypr/hyprpaper-H0615.conf index 4fb0eeb3..b108ad1a 100644 --- a/nixos/home-manager/env/config/hypr/hyprpaper.conf +++ b/nixos/home-manager/env/config/hypr/hyprpaper-H0615.conf @@ -4,5 +4,4 @@ preload = ~/.dotfiles/wallpaper/images_dark/1080x1920.png wallpaper = HDMI-A-1,~/.dotfiles/wallpaper/images_dark/1920x1200.png wallpaper = DP-1,~/.dotfiles/wallpaper/images_dark/1080x1920.png -wallpaper = DSI-1,~/.dotfiles/wallpaper/images_dark/1920x1080.png -wallpaper = *,~/.dotfiles/wallpaper/images_dark/1920x1080.png +wallpaper = ,~/.dotfiles/wallpaper/images_dark/1920x1080.png diff --git a/nixos/home-manager/env/config/hypr/hyprpaper-northstar.conf b/nixos/home-manager/env/config/hypr/hyprpaper-northstar.conf new file mode 100644 index 00000000..fff67b6e --- /dev/null +++ b/nixos/home-manager/env/config/hypr/hyprpaper-northstar.conf @@ -0,0 +1,4 @@ +preload = ~/.dotfiles/wallpaper/images_dark/1920x1080.png + +wallpaper = DSI-1,~/.dotfiles/wallpaper/images_dark/1920x1080.png +wallpaper = ,~/.dotfiles/wallpaper/images_dark/1920x1080.png diff --git a/nixos/home-manager/env/config/hypr/hyprpaper-vanguard.conf b/nixos/home-manager/env/config/hypr/hyprpaper-vanguard.conf new file mode 100644 index 00000000..164f2c29 --- /dev/null +++ b/nixos/home-manager/env/config/hypr/hyprpaper-vanguard.conf @@ -0,0 +1,3 @@ +preload = ~/.dotfiles/wallpaper/images_dark/1920x1080.png + +wallpaper = DP-1,~/.dotfiles/wallpaper/images_dark/1920x1080.png diff --git a/nixos/home-manager/env/config/waybar/style.css b/nixos/home-manager/env/config/waybar/style.css index c71ddb85..d9b6ac5b 100644 --- a/nixos/home-manager/env/config/waybar/style.css +++ b/nixos/home-manager/env/config/waybar/style.css @@ -39,7 +39,7 @@ * { /* `otf-font-awesome` is required to be installed for icons */ font-family: FiraCode Nerd Font, FontAwesome, Roboto, Helvetica, Arial, sans-serif; - font-size: 14px; + font-size: 16px; } window#waybar { diff --git a/nixos/home-manager/env/hyprland.nix b/nixos/home-manager/env/hyprland.nix index ae3763fe..42db71dc 100644 --- a/nixos/home-manager/env/hyprland.nix +++ b/nixos/home-manager/env/hyprland.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: let flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; @@ -13,19 +13,11 @@ in ./common-wayland.nix ]; - home.packages = with pkgs; [ - hyprpaper - dolphin - ]; wayland.windowManager.hyprland = { enable = true; xwayland = { enable = true; hidpi = true; }; - extraConfig = - builtins.readFile (./config/hypr/macchiato.conf) - + "\n" - + builtins.readFile (./config/hypr/hyprland.conf); }; } diff --git a/nixos/home-manager/env/sway.nix b/nixos/home-manager/env/sway.nix index 3bb062cc..704ce62c 100644 --- a/nixos/home-manager/env/sway.nix +++ b/nixos/home-manager/env/sway.nix @@ -1,12 +1,6 @@ -{ pkgs, ... }: +{ ... }: { imports = [ ./common-wayland.nix ]; - home.packages = with pkgs; [ - hyprpaper - dolphin - jq - socat - ]; wayland.windowManager.sway = { enable = true; }; diff --git a/nixos/home-manager/ukaea-elitherl.nix b/nixos/home-manager/ukaea-elitherl.nix index e7c65a1e..8007ffca 100644 --- a/nixos/home-manager/ukaea-elitherl.nix +++ b/nixos/home-manager/ukaea-elitherl.nix @@ -21,5 +21,10 @@ userEmail = "evie.litherland-smith@ukaea.uk"; }; + wayland.windowManager.hyprland.extraConfig = + builtins.readFile (./env/config/hypr/macchiato.conf) + "\n" + + builtins.readFile (./env/config/hypr/hyprland.conf) + "\n" + + builtins.readFile (./env/config/hypr/hyprland-H0615.conf); + home.stateVersion = "22.11"; } diff --git a/nixos/home-manager/vanguard-xenia.nix b/nixos/home-manager/vanguard-xenia.nix index 9bbb26b8..ec88fb0b 100644 --- a/nixos/home-manager/vanguard-xenia.nix +++ b/nixos/home-manager/vanguard-xenia.nix @@ -1,6 +1,7 @@ -{ pkgs, ... }: { +{ ... }: { imports = [ ./env/hyprland.nix + ./env/sway.nix ./packages/env ./packages/tui ./packages/gui/browser.nix @@ -20,16 +21,10 @@ userEmail = "evie@xenia.me.uk"; }; - # Fix for logitech MX master button ordering... - programs.bash.initExtra = '' - ${pkgs.xorg.xinput}/bin/xinput set-button-map "Logitech USB Receiver Mouse" 3 2 1 - ''; - programs.zsh.initExtra = '' - ${pkgs.xorg.xinput}/bin/xinput set-button-map "Logitech USB Receiver Mouse" 3 2 1 - ''; - programs.fish.interactiveShellInit = '' - ${pkgs.xorg.xinput}/bin/xinput set-button-map "Logitech USB Receiver Mouse" 3 2 1 - ''; + wayland.windowManager.hyprland.extraConfig = + builtins.readFile (./env/config/hypr/macchiato.conf) + "\n" + + builtins.readFile (./env/config/hypr/hyprland.conf) + "\n" + + builtins.readFile (./env/config/hypr/hyprland-vanguard.conf); home.stateVersion = "22.11"; } diff --git a/nixos/vanguard-xenia.nix b/nixos/vanguard-xenia.nix index 5414268e..0882fba0 100644 --- a/nixos/vanguard-xenia.nix +++ b/nixos/vanguard-xenia.nix @@ -4,7 +4,7 @@ imports = [ ./common.nix ./locales/en_GB.nix - ./desktop/xfce-bspwm.nix + ./desktop/hyprland.nix ]; networking.hostName = "Vanguard"; # Define your hostname. @@ -28,7 +28,6 @@ enable = true; user = "xenia"; }; - # Fix Logitech MX Master buttons being inverted }; # Set up home manager for user