Split hypr config into machine-specific components

This commit is contained in:
Evie Litherland-Smith 2023-04-12 23:29:58 +01:00
parent 5e2f3c5fa5
commit 02e8a0cd62
13 changed files with 54 additions and 50 deletions

View file

@ -7,6 +7,8 @@
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
swayimg swayimg
hyprpaper
dolphin
jq jq
socat socat
]; ];

View file

@ -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

View file

@ -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

View file

@ -1,14 +1,13 @@
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=,preferred,auto,auto monitor=,preferred,auto,auto
monitor=HDMI-A-1,preferred,auto,auto
monitor=DP-1,preferred,auto,auto,transform,1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch # Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox # 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 a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf # source = ~/.config/hypr/myColors.conf
@ -93,10 +92,8 @@ gestures {
workspace_swipe = off workspace_swipe = off
} }
# Example per-device config misc {
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more disable_autoreload = yes
device:epic-mouse-v1 {
sensitivity = -0.5
} }
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
@ -112,15 +109,6 @@ windowrule = workspace 6, ^(Steam)$
windowrule = workspace 7, ^(Bitwarden)$ windowrule = workspace 7, ^(Bitwarden)$
windowrule = workspace 8, ^(Nxplayer.bin)$ 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 # See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER $mainMod = SUPER

View file

@ -4,5 +4,4 @@ preload = ~/.dotfiles/wallpaper/images_dark/1080x1920.png
wallpaper = HDMI-A-1,~/.dotfiles/wallpaper/images_dark/1920x1200.png wallpaper = HDMI-A-1,~/.dotfiles/wallpaper/images_dark/1920x1200.png
wallpaper = DP-1,~/.dotfiles/wallpaper/images_dark/1080x1920.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

View file

@ -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

View file

@ -0,0 +1,3 @@
preload = ~/.dotfiles/wallpaper/images_dark/1920x1080.png
wallpaper = DP-1,~/.dotfiles/wallpaper/images_dark/1920x1080.png

View file

@ -39,7 +39,7 @@
* { * {
/* `otf-font-awesome` is required to be installed for icons */ /* `otf-font-awesome` is required to be installed for icons */
font-family: FiraCode Nerd Font, FontAwesome, Roboto, Helvetica, Arial, sans-serif; font-family: FiraCode Nerd Font, FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 14px; font-size: 16px;
} }
window#waybar { window#waybar {

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { ... }:
let let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
@ -13,19 +13,11 @@ in
./common-wayland.nix ./common-wayland.nix
]; ];
home.packages = with pkgs; [
hyprpaper
dolphin
];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland = { xwayland = {
enable = true; enable = true;
hidpi = true; hidpi = true;
}; };
extraConfig =
builtins.readFile (./config/hypr/macchiato.conf)
+ "\n"
+ builtins.readFile (./config/hypr/hyprland.conf);
}; };
} }

View file

@ -1,12 +1,6 @@
{ pkgs, ... }: { ... }:
{ {
imports = [ ./common-wayland.nix ]; imports = [ ./common-wayland.nix ];
home.packages = with pkgs; [
hyprpaper
dolphin
jq
socat
];
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
}; };

View file

@ -21,5 +21,10 @@
userEmail = "evie.litherland-smith@ukaea.uk"; 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"; home.stateVersion = "22.11";
} }

View file

@ -1,6 +1,7 @@
{ pkgs, ... }: { { ... }: {
imports = [ imports = [
./env/hyprland.nix ./env/hyprland.nix
./env/sway.nix
./packages/env ./packages/env
./packages/tui ./packages/tui
./packages/gui/browser.nix ./packages/gui/browser.nix
@ -20,16 +21,10 @@
userEmail = "evie@xenia.me.uk"; userEmail = "evie@xenia.me.uk";
}; };
# Fix for logitech MX master button ordering... wayland.windowManager.hyprland.extraConfig =
programs.bash.initExtra = '' builtins.readFile (./env/config/hypr/macchiato.conf) + "\n"
${pkgs.xorg.xinput}/bin/xinput set-button-map "Logitech USB Receiver Mouse" 3 2 1 + builtins.readFile (./env/config/hypr/hyprland.conf) + "\n"
''; + builtins.readFile (./env/config/hypr/hyprland-vanguard.conf);
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
'';
home.stateVersion = "22.11"; home.stateVersion = "22.11";
} }

View file

@ -4,7 +4,7 @@
imports = [ imports = [
./common.nix ./common.nix
./locales/en_GB.nix ./locales/en_GB.nix
./desktop/xfce-bspwm.nix ./desktop/hyprland.nix
]; ];
networking.hostName = "Vanguard"; # Define your hostname. networking.hostName = "Vanguard"; # Define your hostname.
@ -28,7 +28,6 @@
enable = true; enable = true;
user = "xenia"; user = "xenia";
}; };
# Fix Logitech MX Master buttons being inverted
}; };
# Set up home manager for user # Set up home manager for user