hyprland: scaffold tiling-first session on FredOS-Gaming
Adds settings/hyprland.nix as a sibling to the GNOME module, gated to the Gaming host. GDM picks up the new session entry automatically; GNOME remains the default and can be reselected at login. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
6536141f9b
commit
61981995ec
2 changed files with 204 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
# Generic settings #
|
# Generic settings #
|
||||||
./settings/gnome.nix
|
./settings/gnome.nix
|
||||||
|
./settings/hyprland.nix
|
||||||
./settings/locale.nix
|
./settings/locale.nix
|
||||||
./settings/audio.nix
|
./settings/audio.nix
|
||||||
./settings/users.nix
|
./settings/users.nix
|
||||||
|
|
|
||||||
203
settings/hyprland.nix
Normal file
203
settings/hyprland.nix
Normal file
|
|
@ -0,0 +1,203 @@
|
||||||
|
# settings/hyprland.nix
|
||||||
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf (config.networking.hostName == "FredOS-Gaming") {
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
config.hyprland.default = [ "hyprland" "gtk" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
# Polkit GUI agent for GUI sudo prompts under Hyprland
|
||||||
|
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
partOf = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
ghostty
|
||||||
|
waybar
|
||||||
|
wofi
|
||||||
|
mako
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
cliphist
|
||||||
|
brightnessctl
|
||||||
|
pamixer
|
||||||
|
playerctl
|
||||||
|
hyprpaper
|
||||||
|
hyprlock
|
||||||
|
hypridle
|
||||||
|
hyprshot
|
||||||
|
networkmanagerapplet
|
||||||
|
pavucontrol
|
||||||
|
polkit_gnome
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.fred = { config, lib, pkgs, ... }: {
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
systemd.variables = [ "--all" ];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
monitor = ",preferred,auto,1";
|
||||||
|
|
||||||
|
"$mod" = "SUPER";
|
||||||
|
"$term" = "ghostty";
|
||||||
|
"$menu" = "wofi --show drun";
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"waybar"
|
||||||
|
"mako"
|
||||||
|
"hyprpaper"
|
||||||
|
"nm-applet --indicator"
|
||||||
|
"wl-paste --type text --watch cliphist store"
|
||||||
|
"wl-paste --type image --watch cliphist store"
|
||||||
|
];
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 6;
|
||||||
|
gaps_out = 12;
|
||||||
|
border_size = 2;
|
||||||
|
layout = "dwindle";
|
||||||
|
resize_on_border = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 8;
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 6;
|
||||||
|
passes = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = "gb,no";
|
||||||
|
kb_options = "grp:alt_shift_toggle";
|
||||||
|
follow_mouse = 1;
|
||||||
|
accel_profile = "flat";
|
||||||
|
sensitivity = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
dwindle = {
|
||||||
|
preserve_split = true;
|
||||||
|
pseudotile = true;
|
||||||
|
# New windows split the focused container 50/50 — your usual
|
||||||
|
# 2-way layout falls out of dwindle's defaults.
|
||||||
|
};
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
disable_hyprland_logo = true;
|
||||||
|
disable_splash_rendering = true;
|
||||||
|
focus_on_activate = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mirror the GNOME bindings so muscle memory carries over
|
||||||
|
bind = [
|
||||||
|
"$mod, T, exec, $term"
|
||||||
|
"$mod, E, exec, nautilus"
|
||||||
|
"$mod, SPACE, exec, $menu"
|
||||||
|
"$mod, Q, killactive"
|
||||||
|
"$mod SHIFT, E, exit"
|
||||||
|
|
||||||
|
# Floating / layout
|
||||||
|
"$mod, V, togglefloating"
|
||||||
|
"$mod, F, fullscreen, 0"
|
||||||
|
"$mod, P, pseudo"
|
||||||
|
"$mod, S, togglesplit"
|
||||||
|
|
||||||
|
# Focus
|
||||||
|
"$mod, left, movefocus, l"
|
||||||
|
"$mod, right, movefocus, r"
|
||||||
|
"$mod, up, movefocus, u"
|
||||||
|
"$mod, down, movefocus, d"
|
||||||
|
"$mod, H, movefocus, l"
|
||||||
|
"$mod, L, movefocus, r"
|
||||||
|
"$mod, K, movefocus, u"
|
||||||
|
"$mod, J, movefocus, d"
|
||||||
|
|
||||||
|
# Move windows
|
||||||
|
"$mod SHIFT, left, movewindow, l"
|
||||||
|
"$mod SHIFT, right, movewindow, r"
|
||||||
|
"$mod SHIFT, up, movewindow, u"
|
||||||
|
"$mod SHIFT, down, movewindow, d"
|
||||||
|
|
||||||
|
# Workspaces
|
||||||
|
"$mod, 1, workspace, 1"
|
||||||
|
"$mod, 2, workspace, 2"
|
||||||
|
"$mod, 3, workspace, 3"
|
||||||
|
"$mod, 4, workspace, 4"
|
||||||
|
"$mod, 5, workspace, 5"
|
||||||
|
"$mod, 6, workspace, 6"
|
||||||
|
"$mod, 7, workspace, 7"
|
||||||
|
"$mod, 8, workspace, 8"
|
||||||
|
"$mod, 9, workspace, 9"
|
||||||
|
"$mod, 0, workspace, 10"
|
||||||
|
|
||||||
|
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||||
|
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||||
|
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||||
|
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||||
|
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||||
|
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||||
|
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||||
|
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||||
|
|
||||||
|
# Screenshots — Shift+Super+S matches your GNOME binding
|
||||||
|
"$mod SHIFT, S, exec, hyprshot -m region --clipboard-only"
|
||||||
|
", Print, exec, hyprshot -m output --clipboard-only"
|
||||||
|
|
||||||
|
# Settings shortcut — Super+I matches your GNOME binding
|
||||||
|
"$mod, I, exec, pavucontrol"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindm = [
|
||||||
|
"$mod, mouse:272, movewindow"
|
||||||
|
"$mod, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindel = [
|
||||||
|
", XF86AudioRaiseVolume, exec, pamixer -i 5"
|
||||||
|
", XF86AudioLowerVolume, exec, pamixer -d 5"
|
||||||
|
", XF86AudioMute, exec, pamixer -t"
|
||||||
|
", XF86MonBrightnessUp, exec, brightnessctl set 5%+"
|
||||||
|
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindl = [
|
||||||
|
", XF86AudioPlay, exec, playerctl play-pause"
|
||||||
|
", XF86AudioNext, exec, playerctl next"
|
||||||
|
", XF86AudioPrev, exec, playerctl previous"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/hypr/hyprpaper.conf".text = ''
|
||||||
|
preload = ${config.home.homeDirectory}/.local/share/backgrounds/wallpaper.png
|
||||||
|
wallpaper = ,${config.home.homeDirectory}/.local/share/backgrounds/wallpaper.png
|
||||||
|
splash = false
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue