Hyprland updates

This commit is contained in:
Evie Litherland-Smith 2023-07-07 17:25:04 +01:00
parent 782bf9b1eb
commit 040e7286c0
4 changed files with 335 additions and 144 deletions

View file

@ -115,7 +115,7 @@
"inputs": { "inputs": {
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
"haskell-flake": "haskell-flake", "haskell-flake": "haskell-flake",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1686721748, "lastModified": 1686721748,
@ -173,6 +173,48 @@
"type": "github" "type": "github"
} }
}, },
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1688653598,
"narHash": "sha256-gLNu5/SEw3gg5SjuAfkwFSR473Wnc6GaFvS7kmySi7A=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "e632bf176b04968ca6a22f6e5d5f1a7bf77b6fa6",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1684265364,
"narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"neovim-flake": { "neovim-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -223,11 +265,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1686501370, "lastModified": 1688500189,
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", "narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", "rev": "78419edadf0fabbe5618643bd850b2f2198ed060",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -256,6 +298,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1686501370,
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1688231357, "lastModified": 1688231357,
"narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=",
@ -274,8 +332,9 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"wallpapers": "wallpapers" "wallpapers": "wallpapers"
} }
}, },
@ -308,6 +367,49 @@
"type": "git", "type": "git",
"url": "https://git.xenia.me.uk/xenia/wallpapers.git" "url": "https://git.xenia.me.uk/xenia/wallpapers.git"
} }
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1686753331,
"narHash": "sha256-KovjVFwcuoUO0eu/UiWrnD3+m/K+SHSAVIz4xF9K1XA=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "7e7633abf09b362d0bad9e3fc650fd692369291d",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1685385764,
"narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -12,6 +12,7 @@
url = "github:nix-community/neovim-nightly-overlay"; url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprland.url = "github:hyprwm/Hyprland";
}; };
outputs = { outputs = {
@ -19,9 +20,10 @@
home-manager, home-manager,
wallpapers, wallpapers,
neovim-nightly-overlay, neovim-nightly-overlay,
hyprland,
... ...
}: let }: let
home-config = { home-manager-config = {
imports = [home-manager.nixosModules.home-manager]; imports = [home-manager.nixosModules.home-manager];
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -36,6 +38,34 @@
}; };
}; };
}; };
services = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
gsettings-desktop-schemas
pavucontrol
pamixer
pulseaudio
grim
slurp
];
security.pam.services.swaylock = {};
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
services = {
blueman.enable = true;
gvfs.enable = true;
tumbler.enable = true;
};
};
waybar-experimental-overlay = final: prev: {
waybar = prev.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
});
};
in { in {
nixosConfigurations = { nixosConfigurations = {
Legion = nixpkgs.lib.nixosSystem { Legion = nixpkgs.lib.nixosSystem {
@ -44,7 +74,7 @@
config.allowUnfree = true; config.allowUnfree = true;
}; };
modules = [ modules = [
home-config home-manager-config
./hosts/Legion ./hosts/Legion
./services/Legion.nix ./services/Legion.nix
{ {
@ -66,7 +96,7 @@
overlays = [neovim-nightly-overlay.overlay]; overlays = [neovim-nightly-overlay.overlay];
}; };
modules = [ modules = [
home-config home-manager-config
./hosts/Vanguard ./hosts/Vanguard
./desktop/bspwm.nix ./desktop/bspwm.nix
./desktop/awesome.nix ./desktop/awesome.nix
@ -115,22 +145,24 @@
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;
overlays = [neovim-nightly-overlay.overlay]; overlays = [
waybar-experimental-overlay
neovim-nightly-overlay.overlay
];
}; };
modules = [ modules = [
home-config home-manager-config
services
hyprland.nixosModules.default
./hosts/Ronin ./hosts/Ronin
./desktop/bspwm.nix
./services/syncthing/Ronin.nix ./services/syncthing/Ronin.nix
({pkgs, ...}: { ({pkgs, ...}: {
services.xserver.displayManager = { programs.hyprland.enable = true;
autoLogin.user = "elitherl";
defaultSession = "xfce+bspwm";
};
home-manager.users.elitherl = { home-manager.users.elitherl = {
imports = [ imports = [
hyprland.homeManagerModules.default
./home/work.nix ./home/work.nix
./home/desktop/bspwm.nix ./home/desktop/hyprland.nix
./home/gui ./home/gui
]; ];
home = { home = {
@ -139,6 +171,16 @@
stateVersion = "22.11"; stateVersion = "22.11";
}; };
programs.neovim.package = pkgs.neovim-nightly; programs.neovim.package = pkgs.neovim-nightly;
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${wallpapers.outputs.default}
wallpaper = ,${wallpapers.outputs.default}
'';
xdg.configFile."hypr/extra.conf".text = ''
monitor=desc:Iiyama North America PLB2403WS 0574281251316,1920x1200,0x185,1
monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,1920x1080,1920x0,1,transform,1
monitor=eDP-1,disable
monitor=,preferred,auto,auto
'';
xsession.windowManager.bspwm.extraConfig = '' xsession.windowManager.bspwm.extraConfig = ''
if [[ "$(xrandr --query | grep -E '^DP-1-1 connected')" ]]; then if [[ "$(xrandr --query | grep -E '^DP-1-1 connected')" ]]; then
xrandr --output eDP-1 --off\ xrandr --output eDP-1 --off\

View file

@ -1,8 +1,28 @@
{ {
pkgs, pkgs,
lib, lib,
config,
... ...
}: { }: let
configure-gtk = pkgs.writeTextFile {
name = "configure-gtk";
destination = "/bin/configure-gtk";
executable = true;
text = let
schema = pkgs.gsettings-desktop-schemas;
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
gtk-theme = config.gtk.theme.name;
icon-theme = config.gtk.iconTheme.name;
cursor-theme = config.gtk.cursorTheme.name;
in ''
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
gnome_schema=org.gnome.desktop.interface
gsettings set $gnome_schema gtk-theme '${gtk-theme}'
gsettings set $gnome_schema icon-theme '${icon-theme}'
gsettings set $gnome_schema cursor-theme '${cursor-theme}'
'';
};
in {
imports = [ imports = [
./swaylock.nix ./swaylock.nix
./waybar.nix ./waybar.nix
@ -10,6 +30,15 @@
./dunst.nix ./dunst.nix
./rofi.nix ./rofi.nix
]; ];
home.packages = with pkgs; [
hyprpaper
configure-gtk
pipewire
wireplumber
wl-clipboard
swayimg
brightnessctl
];
programs.firefox.package = pkgs.firefox-wayland; programs.firefox.package = pkgs.firefox-wayland;
programs.rofi.package = pkgs.rofi-wayland; programs.rofi.package = pkgs.rofi-wayland;
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
@ -19,134 +48,151 @@
enable = true; enable = true;
hidpi = true; hidpi = true;
}; };
extraConfig = lib.mkDefault ''source=./common.conf ''; extraConfig = ''
monitor = ,preferred,auto,auto
exec-once = waybar & hyprpaper & dunst
source = ./macchiato.conf
env = XDG_CURRENT_DESKTOP=Hyprland
env = XDG_SESSION_TYPE=wayland
env = XDG_SESSION_DESKTOP=Hyprland
env = GDK_BACKEND=wayland,x11
env = GTK_THEME,Sweet-Dark
env = XCURSOR_THEME,Catppuccin-Macchiato-Dark-Cursors
env = XCURSOR_SIZE,24
input {
kb_layout = gb
follow_mouse = 1
touchpad {
natural_scroll = yes
}
}
general {
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = $mauve
col.group_border_active = $mauve
col.inactive_border = $surface2
col.group_border = $surface2
layout = dwindle
}
dwindle {
force_split = 2
preserve_split = true
}
decoration {
rounding = 10
blur = yes
blur_size = 5
blur_passes = 3
blur_new_optimizations = on
blur_xray = off
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = $base
}
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
bind = SUPER, Return, exec, wezterm
bind = SUPER, Space, exec, pkill rofi || rofi -show drun
bind = SUPER, W, exec, firefox
bind = SUPER, E, exec, thunar
bind = SUPER, Q, killactive,
bind = SUPER, F1, exec, swaylock
bind = SUPER, M, fullscreen, 1
bind = SUPER SHIFT, M, fullscreen, 0
bind = SUPER SHIFT, P, exec, powermenu
bind = SUPER SHIFT, Space, togglefloating,
bind = , Print, exec, grim -g "$(slurp)"
bind = , XF86AudioMute, exec, pamixer -t
binde = , XF86AudioRaiseVolume, exec, pamixer -i 2
binde = , XF86AudioLowerVolume, exec, pamixer -d 2
bind = SUPER, H, movefocus, l
bind = SUPER, L, movefocus, r
bind = SUPER, K, movefocus, u
bind = SUPER, J, movefocus, d
bind = SUPER SHIFT, H, movewindow, l
bind = SUPER SHIFT, L, movewindow, r
bind = SUPER SHIFT, K, movewindow, u
bind = SUPER SHIFT, J, movewindow, d
bind = SUPER, A, workspace, 1
bind = SUPER, S, workspace, 2
bind = SUPER, D, workspace, 3
bind = SUPER, F, workspace, 4
bind = SUPER, U, workspace, 5
bind = SUPER, I, workspace, 6
bind = SUPER, O, workspace, 7
bind = SUPER, P, workspace, 8
bind = SUPER SHIFT, A, movetoworkspace, 1
bind = SUPER SHIFT, S, movetoworkspace, 2
bind = SUPER SHIFT, D, movetoworkspace, 3
bind = SUPER SHIFT, F, movetoworkspace, 4
bind = SUPER SHIFT, U, movetoworkspace, 5
bind = SUPER SHIFT, I, movetoworkspace, 6
bind = SUPER SHIFT, O, movetoworkspace, 7
bind = SUPER SHIFT, P, movetoworkspace, 8
bind = SUPER, period, workspace, e+1
bind = SUPER, comma, workspace, e-1
bind = SUPER, bracketright, focusmonitor, +1
bind = SUPER, bracketleft, focusmonitor, -1
bind = SUPER SHIFT, bracketright, movecurrentworkspacetomonitor, +1
bind = SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1
bind = SUPER, N, workspace, empty
bind = SUPER, C, togglespecialworkspace
bind = SUPER, tab, workspace, previous
bind = SUPER SHIFT, N, movetoworkspace, empty
bind = SUPER SHIFT, C, movetoworkspace, special
bind = SUPER SHIFT, tab, movetoworkspace, previous
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrule = float, ^(foot)$
windowrule = float, ^(pavucontrol)$
windowrule = float, ^(.blueman-manager-wrapped)$
windowrule = float, ^(otpclient)$
windowrule = float, ^(thunar)$
windowrule = center, ^(foot)$
windowrule = center, ^(pavucontrol)$
windowrule = center, ^(.blueman-manager-wrapped)$
windowrule = move 2% 6%, ^(otpclient)$
windowrule = workspace 2, neovide
windowrule = workspace 3, firefox
windowrule = workspace 5 silent, ^(Signal|fractal|discord|teams-for-linux)$
windowrule = workspace 4, thunar
windowrule = workspace 4, libreoffice.*
windowrule = workspace 4, Zotero
source = ./extra.conf
'';
}; };
xdg.configFile."hypr/common.conf".text = '' xdg.configFile."hypr/extra.conf".text = lib.mkDefault '''';
monitor = ,preferred,auto,auto
exec-once = waybar & hyprpaper & dunst
source = ./macchiato.conf
env = XDG_CURRENT_DESKTOP=Hyprland
env = XDG_SESSION_TYPE=wayland
env = XDG_SESSION_DESKTOP=Hyprland
env = GDK_BACKEND=wayland,x11
env = GTK_THEME,Sweet-Dark
env = XCURSOR_THEME,Catppuccin-Macchiato-Dark-Cursors
env = XCURSOR_SIZE,24
input {
kb_layout = gb
follow_mouse = 1
touchpad {
natural_scroll = yes
}
}
general {
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = $mauve
col.group_border_active = $mauve
col.inactive_border = $surface2
col.group_border = $surface2
layout = dwindle
}
dwindle {
force_split = 2
preserve_split = true
}
decoration {
rounding = 10
blur = yes
blur_size = 5
blur_passes = 3
blur_new_optimizations = on
blur_xray = off
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = $base
}
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
bind = SUPER, Return, exec, wezterm
bind = SUPER, Space, exec, pkill rofi || rofi -show drun
bind = SUPER, E, exec, thunar
bind = SUPER, Q, killactive,
bind = SUPER, P, exec, swaylock
bind = SUPER, M, fullscreen, 0
bind = SUPER SHIFT, M, fullscreen, 1
bind = SUPER SHIFT, P, exec, powermenu
bind = SUPER SHIFT, Space, togglefloating,
bind = , Print, exec, grim -g "$(slurp)"
bind = , XF86AudioMute, exec, pamixer -t
binde = , XF86AudioRaiseVolume, exec, pamixer -i 2
binde = , XF86AudioLowerVolume, exec, pamixer -d 2
bind = SUPER, H, movefocus, l
bind = SUPER, L, movefocus, r
bind = SUPER, K, movefocus, u
bind = SUPER, J, movefocus, d
bind = SUPER SHIFT, H, movewindow, l
bind = SUPER SHIFT, L, movewindow, r
bind = SUPER SHIFT, K, movewindow, u
bind = SUPER SHIFT, J, movewindow, d
windowrule = workspace 2, neovide
windowrule = workspace 3, firefox
windowrule = workspace 4, thunar
windowrule = workspace 4, libreoffice.*
windowrule = workspace 4, Zotero
windowrule = workspace 5, Signal
windowrule = workspace 5, fractal
bind = SUPER, A, workspace, 1
bind = SUPER, S, workspace, 2
bind = SUPER, D, workspace, 3
bind = SUPER, F, workspace, 4
bind = SUPER, U, workspace, 5
bind = SUPER, I, workspace, 6
bind = SUPER, O, workspace, 7
bind = SUPER, P, workspace, 8
bind = SUPER SHIFT, A, movetoworkspace, 1
bind = SUPER SHIFT, S, movetoworkspace, 2
bind = SUPER SHIFT, D, movetoworkspace, 3
bind = SUPER SHIFT, F, movetoworkspace, 4
bind = SUPER SHIFT, U, movetoworkspace, 5
bind = SUPER SHIFT, I, movetoworkspace, 6
bind = SUPER SHIFT, O, movetoworkspace, 7
bind = SUPER SHIFT, P, movetoworkspace, 8
bind = SUPER, bracketright, focusmonitor, +1
bind = SUPER, bracketleft, focusmonitor, +1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrule = float, pavucontrol
windowrule = center, pavucontrol
windowrule = float, .blueman-manager-wrapped
windowrule = center, .blueman-manager-wrapped
windowrule = float, otpclient
windowrule = move 2% 6%, otpclient
'';
xdg.configFile."hypr/macchiato.conf".text = '' xdg.configFile."hypr/macchiato.conf".text = ''
$rosewaterAlpha = f4dbd6 $rosewaterAlpha = f4dbd6
$flamingoAlpha = f0c6c6 $flamingoAlpha = f0c6c6

View file

@ -15,6 +15,7 @@
enable = true; enable = true;
flake = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main"; flake = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
}; };
networking.networkmanager.enable = true;
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
virtualisation.podman.enable = true; virtualisation.podman.enable = true;
programs = { programs = {