refactor: make hosts declarative and consolidate shared config

- add my.username / my.gaming.enable / my.ai.local.enable options and
  gate optional app modules on them instead of per-host import lists
- move vendor-neutral hardware.graphics into modules/graphical, leaving
  only NVIDIA-specific drivers and env vars in modules/hardware/nvidia
- derive the primary user everywhere from my.username (users, getty,
  home-manager, tmpfiles)
- de-duplicate Hyprland autostart down to a single system loginShellInit
  using the start-hyprland wrapper
- consolidate all nixpkgs overlays into modules/core/nix.nix and use
  final.stdenv.hostPlatform.system
- make the zsh rebuild helper target $(hostname) instead of hardcoded hades
- add nixpkgs follows for nixos-hardware, pi and comfy-ui (single nixpkgs)
- add .gitignore and a nixfmt flake formatter; format all nix files
- remove empty browser.nix/display-configuration.nix and rename
  local_ai.nix -> local-ai.nix
- document the my.* toggles in the README
This commit is contained in:
2026-09-18 23:32:32 -07:00
parent 367e21ef95
commit 598a43eace
30 changed files with 1093 additions and 768 deletions

View File

@@ -29,25 +29,26 @@ let
};
in
{
programs.chromium = {
enable = true;
package = pkgs.brave;
commandLineArgs = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
"--enable-wayland-ime"
"--ignore-gpu-blocklist"
"--enable-gpu-rasterization"
"--enable-zero-copy"
];
extensions = [
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
{ id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; } # Vimium C
];
};
xdg.configFile."brave/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
xdg.configFile."BraveSoftware/Brave-Browser/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
xdg.configFile."chromium/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
programs.chromium = {
enable = true;
package = pkgs.brave;
commandLineArgs = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
"--enable-wayland-ime"
"--ignore-gpu-blocklist"
"--enable-gpu-rasterization"
"--enable-zero-copy"
];
extensions = [
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
{ id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; } # Vimium C
];
};
xdg.configFile."brave/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
xdg.configFile."BraveSoftware/Brave-Browser/policies/managed/policies.json".text =
builtins.toJSON bravePolicies;
xdg.configFile."chromium/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
}

View File

@@ -1,14 +1,22 @@
{ pkgs, inputs, ... }:
let
herdrPkg = if (inputs ? herdr && inputs.herdr ? packages && inputs.herdr.packages ? ${pkgs.stdenv.hostPlatform.system})
then inputs.herdr.packages.${pkgs.stdenv.hostPlatform.system}.default
else (pkgs.herdr or null);
herdrPkg =
if
(
inputs ? herdr
&& inputs.herdr ? packages
&& inputs.herdr.packages ? ${pkgs.stdenv.hostPlatform.system}
)
then
inputs.herdr.packages.${pkgs.stdenv.hostPlatform.system}.default
else
(pkgs.herdr or null);
herdrPicker = pkgs.writeShellScriptBin "herdr-picker" (builtins.readFile ./scripts/herdr-picker.sh);
in
{
home.packages = (if herdrPkg != null then [ herdrPkg ] else []) ++ [
home.packages = (if herdrPkg != null then [ herdrPkg ] else [ ]) ++ [
herdrPicker
];
@@ -51,24 +59,24 @@ in
# Cursor text and cursor (background) colors
cursor = "0e0e0e cffc00";
regular0 = "0e0e0e"; # bgSecondary
regular1 = "ff7a59"; # accentCoral
regular2 = "cffc00"; # accentVolt (green)
regular3 = "e3ff66"; # accentVoltLight (yellow)
regular4 = "00bfff"; # accentBlue
regular5 = "c6c6c7"; # Neutral Gray (magenta)
regular6 = "66d9ff"; # Light Cyan
regular7 = "e5e2e1"; # textSecondary
regular0 = "0e0e0e"; # bgSecondary
regular1 = "ff7a59"; # accentCoral
regular2 = "cffc00"; # accentVolt (green)
regular3 = "e3ff66"; # accentVoltLight (yellow)
regular4 = "00bfff"; # accentBlue
regular5 = "c6c6c7"; # Neutral Gray (magenta)
regular6 = "66d9ff"; # Light Cyan
regular7 = "e5e2e1"; # textSecondary
# Bright Colors
bright0 = "2a2929"; # surfaceVariant
bright1 = "ff9a82"; # Bright Coral
bright2 = "dfff66"; # Bright Lime
bright3 = "f0ff8c"; # Bright Volt
bright4 = "66d9ff"; # Bright Blue
bright5 = "e0e0e1"; # Bright Gray
bright6 = "99e6ff"; # Bright Cyan
bright7 = "ffffff"; # textPrimary
bright0 = "2a2929"; # surfaceVariant
bright1 = "ff9a82"; # Bright Coral
bright2 = "dfff66"; # Bright Lime
bright3 = "f0ff8c"; # Bright Volt
bright4 = "66d9ff"; # Bright Blue
bright5 = "e0e0e1"; # Bright Gray
bright6 = "99e6ff"; # Bright Cyan
bright7 = "ffffff"; # textPrimary
# Selection & URLs - volt lime selection like the site
selection-foreground = "0e0e0e";

View File

@@ -1,4 +1,9 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
let
# Deterministic Silicon Volt wallpaper: rendered from SVG at build time,
@@ -8,65 +13,65 @@ let
'';
in
{
imports = [
./hyprland.nix
./hyprlock.nix
./hypridle.nix
./quickshell.nix
];
imports = [
./hyprland.nix
./hyprlock.nix
./hypridle.nix
./quickshell.nix
];
home.packages = with pkgs; [
# Utilities & Tools
grim
slurp
wl-clipboard
cliphist
brightnessctl
jq
home.packages = with pkgs; [
# Utilities & Tools
grim
slurp
wl-clipboard
cliphist
brightnessctl
jq
# Desktop Environment / Hyprland ecosystem
hyprpaper
hyprpolkitagent
];
# Desktop Environment / Hyprland ecosystem
hyprpaper
hyprpolkitagent
];
# Build-time rendered wallpaper
xdg.dataFile."backgrounds/silicon-volt.png".source = wallpaper;
# Build-time rendered wallpaper
xdg.dataFile."backgrounds/silicon-volt.png".source = wallpaper;
# hyprpaper: load the Silicon Volt wallpaper on every output
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${config.home.homeDirectory}/.local/share/backgrounds/silicon-volt.png
wallpaper = ,${config.home.homeDirectory}/.local/share/backgrounds/silicon-volt.png
splash = false
'';
# hyprpaper: load the Silicon Volt wallpaper on every output
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${config.home.homeDirectory}/.local/share/backgrounds/silicon-volt.png
wallpaper = ,${config.home.homeDirectory}/.local/share/backgrounds/silicon-volt.png
splash = false
'';
# Notifications: flat brutalist-glass cards with volt accents
services.mako = {
enable = true;
# Notifications: flat brutalist-glass cards with volt accents
services.mako = {
enable = true;
settings = {
background-color = "#1c1b1bee";
text-color = "#e5e2e1";
border-color = "#cffc00";
border-size = 1;
border-radius = 0;
width = 420;
margin = "12";
padding = "14";
default-timeout = 6000;
font = "JetBrainsMono Nerd Font 11";
format = "<b>%s</b>\\n%b";
"icon-location" = "left";
max-icon-size = 48;
settings = {
background-color = "#1c1b1bee";
text-color = "#e5e2e1";
border-color = "#cffc00";
border-size = 1;
border-radius = 0;
width = 420;
margin = "12";
padding = "14";
default-timeout = 6000;
font = "JetBrainsMono Nerd Font 11";
format = "<b>%s</b>\\n%b";
"icon-location" = "left";
max-icon-size = 48;
"urgency=critical" = {
border-color = "#ff7a59";
text-color = "#ffffff";
default-timeout = 0;
};
"urgency=low" = {
border-color = "#2a2929";
text-color = "#adaaaa";
};
};
"urgency=critical" = {
border-color = "#ff7a59";
text-color = "#ffffff";
default-timeout = 0;
};
"urgency=low" = {
border-color = "#2a2929";
text-color = "#adaaaa";
};
};
};
}

View File

@@ -1,4 +1,9 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
let
mkLua = lib.generators.mkLuaInline;
@@ -8,395 +13,621 @@ in
# Per-host monitor configuration.
#
# Hosts declare their displays once, in hosts/<host>/default.nix, via:
# home-manager.users.anish.volt.monitors = [ { ... } ];
# home-manager.users.<my.username>.volt.monitors = [ { ... } ];
# and the setting flows into Hyprland here. The default (empty output +
# preferred mode) works on any machine with any display.
# -------------------------------------------------------------------------
options.volt.monitors = lib.mkOption {
description = "Hyprland monitor rules for this host";
type = lib.types.listOf (lib.types.submodule {
options = {
output = lib.mkOption {
type = lib.types.str;
default = "";
description = "Output name or desc: match. Empty string matches every output.";
type = lib.types.listOf (
lib.types.submodule {
options = {
output = lib.mkOption {
type = lib.types.str;
default = "";
description = "Output name or desc: match. Empty string matches every output.";
};
mode = lib.mkOption {
type = lib.types.str;
default = "preferred";
description = "Resolution@refresh, e.g. \"3840x2160@164.99Hz\" or \"preferred\".";
};
position = lib.mkOption {
type = lib.types.str;
default = "auto";
};
scale = lib.mkOption {
type = lib.types.either lib.types.number lib.types.str;
default = "auto";
};
vrr = lib.mkOption {
type = lib.types.nullOr (lib.types.either lib.types.number lib.types.str);
default = null;
description = "Optional per-monitor VRR setting (0/1/on-demand).";
};
};
mode = lib.mkOption {
type = lib.types.str;
default = "preferred";
description = "Resolution@refresh, e.g. \"3840x2160@164.99Hz\" or \"preferred\".";
};
position = lib.mkOption {
type = lib.types.str;
default = "auto";
};
scale = lib.mkOption {
type = lib.types.either lib.types.number lib.types.str;
default = "auto";
};
vrr = lib.mkOption {
type = lib.types.nullOr (lib.types.either lib.types.number lib.types.str);
default = null;
description = "Optional per-monitor VRR setting (0/1/on-demand).";
};
};
});
}
);
default = [
{ output = ""; mode = "preferred"; position = "auto"; scale = "auto"; }
{
output = "";
mode = "preferred";
position = "auto";
scale = "auto";
}
];
};
config = {
wayland.windowManager.hyprland.settings.monitor = map (m:
{ inherit (m) output mode position scale; }
wayland.windowManager.hyprland.settings.monitor = map (
m:
{
inherit (m)
output
mode
position
scale
;
}
// (lib.optionalAttrs (m.vrr != null) { inherit (m) vrr; })
) config.volt.monitors;
wayland.windowManager.hyprland = {
enable = true;
configType = "lua";
package = null; # Hyprland package is managed system-wide via NixOS programs.hyprland
enable = true;
configType = "lua";
package = null; # Hyprland package is managed system-wide via NixOS programs.hyprland
settings = {
# -----------------------------------------------------------------------
# 1. Variables & Modifiers (Rendered as Lua local variables)
# -----------------------------------------------------------------------
mainMod = { _var = "SUPER"; };
terminal = { _var = "foot"; };
browser = { _var = "brave"; };
# -----------------------------------------------------------------------
# 2. Monitors (hl.monitor) - declared per-host via volt.monitors
# (see hosts/<host>/default.nix); defaults to any display @ preferred.
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
# 3. Environment Variables (hl.env)
# -----------------------------------------------------------------------
env = [
{ _args = [ "XCURSOR_SIZE" "24" ]; }
{ _args = [ "XDG_SESSION_TYPE" "wayland" ]; }
];
# -----------------------------------------------------------------------
# 4. Main Configuration (hl.config) - Strictly validates against Hyprland 0.55+ schema
# -----------------------------------------------------------------------
config = {
input = {
kb_layout = "us";
repeat_delay = 300;
repeat_rate = 50;
follow_mouse = 1;
sensitivity = 0;
touchpad = {
natural_scroll = false;
};
settings = {
# -----------------------------------------------------------------------
# 1. Variables & Modifiers (Rendered as Lua local variables)
# -----------------------------------------------------------------------
mainMod = {
_var = "SUPER";
};
terminal = {
_var = "foot";
};
browser = {
_var = "brave";
};
cursor = {
inactive_timeout = 3;
# Hardware cursors ON (explicit). Note: this replaces the old
# WLR_NO_HARDWARE_CURSORS=1, which forced software rendering.
no_hardware_cursors = false;
};
# -----------------------------------------------------------------------
# 2. Monitors (hl.monitor) - declared per-host via volt.monitors
# (see hosts/<host>/default.nix); defaults to any display @ preferred.
# -----------------------------------------------------------------------
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 2;
col = {
# Silicon Volt: electric lime gradient on focus, glass gray at rest
active_border = {
colors = [ "rgba(cffc00ee)" "rgba(e3ff66ee)" ];
angle = 45;
# -----------------------------------------------------------------------
# 3. Environment Variables (hl.env)
# -----------------------------------------------------------------------
env = [
{
_args = [
"XCURSOR_SIZE"
"24"
];
}
{
_args = [
"XDG_SESSION_TYPE"
"wayland"
];
}
];
# -----------------------------------------------------------------------
# 4. Main Configuration (hl.config) - Strictly validates against Hyprland 0.55+ schema
# -----------------------------------------------------------------------
config = {
input = {
kb_layout = "us";
repeat_delay = 300;
repeat_rate = 50;
follow_mouse = 1;
sensitivity = 0;
touchpad = {
natural_scroll = false;
};
inactive_border = "rgba(ffffff14)";
};
layout = "dwindle";
};
group = {
groupbar = {
font_size = 14;
font_family = "JetBrainsMono Nerd Font";
cursor = {
inactive_timeout = 3;
# Hardware cursors ON (explicit). Note: this replaces the old
# WLR_NO_HARDWARE_CURSORS=1, which forced software rendering.
no_hardware_cursors = false;
};
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 2;
col = {
active = "rgba(cffc0022)";
inactive = "rgba(ffffff08)";
# Silicon Volt: electric lime gradient on focus, glass gray at rest
active_border = {
colors = [
"rgba(cffc00ee)"
"rgba(e3ff66ee)"
];
angle = 45;
};
inactive_border = "rgba(ffffff14)";
};
layout = "dwindle";
};
group = {
groupbar = {
font_size = 14;
font_family = "JetBrainsMono Nerd Font";
col = {
active = "rgba(cffc0022)";
inactive = "rgba(ffffff08)";
};
};
col = {
border_active = {
colors = [
"rgba(cffc00ee)"
"rgba(e3ff66ee)"
];
angle = 45;
};
border_inactive = "rgba(ffffff14)";
};
};
col = {
border_active = {
colors = [ "rgba(cffc00ee)" "rgba(e3ff66ee)" ];
angle = 45;
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
};
decoration = {
rounding = 4;
# Subtle glass blur to match the brutalist-glass aesthetic
blur = {
enabled = true;
size = 4;
passes = 2;
new_optimizations = true;
ignore_opacity = true;
contrast = 1.1;
brightness = 0.9;
vibrancy = 0.1;
};
shadow = {
enabled = true;
range = 12;
render_power = 3;
color = "rgba(00000066)";
};
border_inactive = "rgba(ffffff14)";
};
};
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
};
decoration = {
rounding = 4;
# Subtle glass blur to match the brutalist-glass aesthetic
blur = {
animations = {
enabled = true;
size = 4;
passes = 2;
new_optimizations = true;
ignore_opacity = true;
contrast = 1.1;
brightness = 0.9;
vibrancy = 0.1;
};
shadow = {
dwindle = {
preserve_split = true;
};
master = {
new_status = "master";
};
};
# -----------------------------------------------------------------------
# 5. Curves & Animations (hl.curve & hl.animation)
# -----------------------------------------------------------------------
curve = [
{
_args = [
"myBezier"
{
type = "bezier";
points = [
[
0.05
0.9
]
[
0.1
1.05
]
];
}
];
}
];
animation = [
{
leaf = "windows";
enabled = true;
range = 12;
render_power = 3;
color = "rgba(00000066)";
};
};
speed = 7;
bezier = "myBezier";
}
{
leaf = "windowsOut";
enabled = true;
speed = 7;
bezier = "default";
style = "popin 80%";
}
{
leaf = "border";
enabled = true;
speed = 10;
bezier = "default";
}
{
leaf = "borderangle";
enabled = true;
speed = 8;
bezier = "default";
}
{
leaf = "fade";
enabled = true;
speed = 7;
bezier = "default";
}
{
leaf = "workspaces";
enabled = true;
speed = 6;
bezier = "default";
}
];
animations = {
enabled = true;
};
# -----------------------------------------------------------------------
# 6. Autostart Daemons & Apps (hl.on)
# -----------------------------------------------------------------------
on = [
{
_args = [
"hyprland.start"
(mkLua ''
function()
hl.exec_cmd("qs")
hl.exec_cmd("hyprpaper")
hl.exec_cmd("mako")
hl.exec_cmd("wl-paste --type text --watch cliphist store")
hl.exec_cmd("wl-paste --type image --watch cliphist store")
hl.exec_cmd("${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent")
end'')
];
}
];
dwindle = {
preserve_split = true;
};
# -----------------------------------------------------------------------
# 7. Keybindings (hl.bind)
# -----------------------------------------------------------------------
bind = [
# Launchers & Window Controls
{
_args = [
(mkLua "mainMod .. \" + Q\"")
(mkLua "hl.dsp.exec_cmd(terminal)")
];
}
{
_args = [
(mkLua "mainMod .. \" + C\"")
(mkLua "hl.dsp.window.close()")
];
}
{
_args = [
(mkLua "mainMod .. \" + SPACE\"")
(mkLua "hl.dsp.exec_cmd(\"rofi -show combi -show-icons\")")
];
}
{
_args = [
(mkLua "mainMod .. \" + N\"")
(mkLua "hl.dsp.exec_cmd(\"swaync-client -t -sw\")")
];
}
{
_args = [
(mkLua "mainMod .. \" + TAB\"")
(mkLua "hl.dsp.exec_cmd(\"qs ipc call overview toggle\")")
];
}
{
_args = [
(mkLua "mainMod .. \" + V\"")
(mkLua "hl.dsp.window.float({ action = \"toggle\" })")
];
}
{
_args = [
(mkLua "mainMod .. \" + R\"")
(mkLua "hl.dsp.exec_cmd(\"rofi -show combi\")")
];
}
{
_args = [
(mkLua "mainMod .. \" + G\"")
(mkLua "hl.dsp.group.toggle()")
];
}
{
_args = [
(mkLua "mainMod .. \" + F\"")
(mkLua "hl.dsp.window.fullscreen({ fullscreen = 0 })")
];
}
master = {
new_status = "master";
};
# Move focus with mainMod + vim
{
_args = [
(mkLua "mainMod .. \" + h\"")
(mkLua "hl.dsp.focus({ direction = \"left\" })")
];
}
{
_args = [
(mkLua "mainMod .. \" + l\"")
(mkLua "hl.dsp.focus({ direction = \"right\" })")
];
}
{
_args = [
(mkLua "mainMod .. \" + k\"")
(mkLua "hl.dsp.focus({ direction = \"up\" })")
];
}
{
_args = [
(mkLua "mainMod .. \" + j\"")
(mkLua "hl.dsp.focus({ direction = \"down\" })")
];
}
# Move focus within a grouped page
{
_args = [
(mkLua "mainMod .. \" + e\"")
(mkLua "hl.dsp.group.next()")
];
}
{
_args = [
(mkLua "mainMod .. \" + d\"")
(mkLua "hl.dsp.group.prev()")
];
}
# Move window or group with vim keys
{
_args = [
(mkLua "mainMod .. \" + SHIFT + h\"")
(mkLua "hl.dsp.window.move({ direction = \"left\" })")
];
}
{
_args = [
(mkLua "mainMod .. \" + SHIFT + l\"")
(mkLua "hl.dsp.window.move({ direction = \"right\" })")
];
}
{
_args = [
(mkLua "mainMod .. \" + SHIFT + k\"")
(mkLua "hl.dsp.window.move({ direction = \"up\" })")
];
}
{
_args = [
(mkLua "mainMod .. \" + SHIFT + j\"")
(mkLua "hl.dsp.window.move({ direction = \"down\" })")
];
}
# Scroll through existing workspaces with mainMod + scroll
{
_args = [
(mkLua "mainMod .. \" + mouse_down\"")
(mkLua "hl.dsp.focus({ workspace = \"e+1\" })")
];
}
{
_args = [
(mkLua "mainMod .. \" + mouse_up\"")
(mkLua "hl.dsp.focus({ workspace = \"e-1\" })")
];
}
# Lock shortcut
{
_args = [
(mkLua "mainMod .. \" + S\"")
(mkLua "hl.dsp.exec_cmd(\"hyprlock\")")
];
}
# Quick access applications
{
_args = [
(mkLua "mainMod .. \" + b\"")
(mkLua "hl.dsp.exec_cmd(browser)")
];
}
# Scratch workspace
{
_args = [
(mkLua "mainMod .. \" + RETURN\"")
(mkLua "hl.dsp.workspace.toggle_special(\"scratch\")")
];
}
{
_args = [
(mkLua "mainMod .. \" + SHIFT + RETURN\"")
(mkLua "hl.dsp.window.move({ workspace = \"special:scratch\" })")
];
}
# Messaging workspace
{
_args = [
(mkLua "mainMod .. \" + M\"")
(mkLua "hl.dsp.workspace.toggle_special(\"messaging\")")
];
}
# Move/resize windows with mouse and dragging
{
_args = [
(mkLua "mainMod .. \" + mouse:272\"")
(mkLua "hl.dsp.window.drag()")
{ mouse = true; }
];
}
{
_args = [
(mkLua "mainMod .. \" + mouse:273\"")
(mkLua "hl.dsp.window.resize()")
{ mouse = true; }
];
}
# Function Row Keys
{
_args = [
"XF86AudioRaiseVolume"
(mkLua "hl.dsp.exec_cmd(\"pactl -- set-sink-volume @DEFAULT_SINK@ +5%\")")
{ repeating = true; }
];
}
{
_args = [
"XF86AudioLowerVolume"
(mkLua "hl.dsp.exec_cmd(\"pactl -- set-sink-volume @DEFAULT_SINK@ -5%\")")
{
repeating = true;
locked = true;
}
];
}
{
_args = [
"XF86AudioMute"
(mkLua "hl.dsp.exec_cmd(\"pactl -- set-sink-mute @DEFAULT_SINK@ toggle\")")
{
repeating = true;
locked = true;
}
];
}
{
_args = [
"XF86MonBrightnessUp"
(mkLua "hl.dsp.exec_cmd(\"brightnessctl set 5%+\")")
{
repeating = true;
locked = true;
}
];
}
{
_args = [
"XF86MonBrightnessDown"
(mkLua "hl.dsp.exec_cmd(\"brightnessctl set 5%-\")")
{
repeating = true;
locked = true;
}
];
}
# Lid switch - generically detects the embedded (eDP*) panel on any laptop
{
_args = [
"switch:off:Lid Switch"
(mkLua "hl.dsp.exec_cmd(\"m=$(hyprctl monitors | awk '$1==\\\"Monitor\\\"{print $2; exit}'); [ -n \\\"$m\\\" ] && hyprctl keyword monitor \\\"$m, preferred, auto, auto\\\"\")")
{ locked = true; }
];
}
{
_args = [
"switch:on:Lid Switch"
(mkLua "hl.dsp.exec_cmd(\"m=$(hyprctl monitors | awk '$1==\\\"Monitor\\\"{print $2; exit}'); [ -n \\\"$m\\\" ] && hyprctl keyword monitor \\\"$m, disable\\\"\")")
{ locked = true; }
];
}
]
# Workspace 1-9 switching and moving
++ (lib.concatMap (i: [
{
_args = [
(mkLua "mainMod .. \" + ${toString i}\"")
(mkLua "hl.dsp.focus({ workspace = ${toString i} })")
];
}
{
_args = [
(mkLua "mainMod .. \" + SHIFT + ${toString i}\"")
(mkLua "hl.dsp.window.move({ workspace = ${toString i} })")
];
}
]) (lib.range 1 9))
# Workspace 10 switching and moving (mapped to key 0)
++ [
{
_args = [
(mkLua "mainMod .. \" + 0\"")
(mkLua "hl.dsp.focus({ workspace = 10 })")
];
}
{
_args = [
(mkLua "mainMod .. \" + SHIFT + 0\"")
(mkLua "hl.dsp.window.move({ workspace = 10 })")
];
}
];
# -----------------------------------------------------------------------
# 8. Workspace Rules (hl.workspace_rule)
# -----------------------------------------------------------------------
workspace_rule = [
{
workspace = "name:messaging";
on_created_empty = "[] togglegroup";
}
];
# -----------------------------------------------------------------------
# 9. Window Rules (hl.window_rule)
# -----------------------------------------------------------------------
window_rule = [
{
name = "signal-messaging";
match = {
class = "Signal";
};
workspace = "special:messaging";
}
{
name = "vesktop-messaging";
match = {
class = "vesktop";
};
workspace = "special:messaging";
}
{
name = "ghidra-tile";
match = {
class = "ghidra-Ghidra";
};
float = false;
}
];
};
# -----------------------------------------------------------------------
# 5. Curves & Animations (hl.curve & hl.animation)
# -----------------------------------------------------------------------
curve = [
{
_args = [
"myBezier"
{
type = "bezier";
points = [ [ 0.05 0.9 ] [ 0.1 1.05 ] ];
}
];
}
];
animation = [
{ leaf = "windows"; enabled = true; speed = 7; bezier = "myBezier"; }
{ leaf = "windowsOut"; enabled = true; speed = 7; bezier = "default"; style = "popin 80%"; }
{ leaf = "border"; enabled = true; speed = 10; bezier = "default"; }
{ leaf = "borderangle"; enabled = true; speed = 8; bezier = "default"; }
{ leaf = "fade"; enabled = true; speed = 7; bezier = "default"; }
{ leaf = "workspaces"; enabled = true; speed = 6; bezier = "default"; }
];
# -----------------------------------------------------------------------
# 6. Autostart Daemons & Apps (hl.on)
# -----------------------------------------------------------------------
on = [
{
_args = [
"hyprland.start"
(mkLua ''function()
hl.exec_cmd("qs")
hl.exec_cmd("hyprpaper")
hl.exec_cmd("mako")
hl.exec_cmd("wl-paste --type text --watch cliphist store")
hl.exec_cmd("wl-paste --type image --watch cliphist store")
hl.exec_cmd("${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent")
end'')
];
}
];
# -----------------------------------------------------------------------
# 7. Keybindings (hl.bind)
# -----------------------------------------------------------------------
bind = [
# Launchers & Window Controls
{ _args = [ (mkLua "mainMod .. \" + Q\"") (mkLua "hl.dsp.exec_cmd(terminal)") ]; }
{ _args = [ (mkLua "mainMod .. \" + C\"") (mkLua "hl.dsp.window.close()") ]; }
{ _args = [ (mkLua "mainMod .. \" + SPACE\"") (mkLua "hl.dsp.exec_cmd(\"rofi -show combi -show-icons\")") ]; }
{ _args = [ (mkLua "mainMod .. \" + N\"") (mkLua "hl.dsp.exec_cmd(\"swaync-client -t -sw\")") ]; }
{ _args = [ (mkLua "mainMod .. \" + TAB\"") (mkLua "hl.dsp.exec_cmd(\"qs ipc call overview toggle\")") ]; }
{ _args = [ (mkLua "mainMod .. \" + V\"") (mkLua "hl.dsp.window.float({ action = \"toggle\" })") ]; }
{ _args = [ (mkLua "mainMod .. \" + R\"") (mkLua "hl.dsp.exec_cmd(\"rofi -show combi\")") ]; }
{ _args = [ (mkLua "mainMod .. \" + G\"") (mkLua "hl.dsp.group.toggle()") ]; }
{ _args = [ (mkLua "mainMod .. \" + F\"") (mkLua "hl.dsp.window.fullscreen({ fullscreen = 0 })") ]; }
# Move focus with mainMod + vim
{ _args = [ (mkLua "mainMod .. \" + h\"") (mkLua "hl.dsp.focus({ direction = \"left\" })") ]; }
{ _args = [ (mkLua "mainMod .. \" + l\"") (mkLua "hl.dsp.focus({ direction = \"right\" })") ]; }
{ _args = [ (mkLua "mainMod .. \" + k\"") (mkLua "hl.dsp.focus({ direction = \"up\" })") ]; }
{ _args = [ (mkLua "mainMod .. \" + j\"") (mkLua "hl.dsp.focus({ direction = \"down\" })") ]; }
# Move focus within a grouped page
{ _args = [ (mkLua "mainMod .. \" + e\"") (mkLua "hl.dsp.group.next()") ]; }
{ _args = [ (mkLua "mainMod .. \" + d\"") (mkLua "hl.dsp.group.prev()") ]; }
# Move window or group with vim keys
{ _args = [ (mkLua "mainMod .. \" + SHIFT + h\"") (mkLua "hl.dsp.window.move({ direction = \"left\" })") ]; }
{ _args = [ (mkLua "mainMod .. \" + SHIFT + l\"") (mkLua "hl.dsp.window.move({ direction = \"right\" })") ]; }
{ _args = [ (mkLua "mainMod .. \" + SHIFT + k\"") (mkLua "hl.dsp.window.move({ direction = \"up\" })") ]; }
{ _args = [ (mkLua "mainMod .. \" + SHIFT + j\"") (mkLua "hl.dsp.window.move({ direction = \"down\" })") ]; }
# Scroll through existing workspaces with mainMod + scroll
{ _args = [ (mkLua "mainMod .. \" + mouse_down\"") (mkLua "hl.dsp.focus({ workspace = \"e+1\" })") ]; }
{ _args = [ (mkLua "mainMod .. \" + mouse_up\"") (mkLua "hl.dsp.focus({ workspace = \"e-1\" })") ]; }
# Lock shortcut
{ _args = [ (mkLua "mainMod .. \" + S\"") (mkLua "hl.dsp.exec_cmd(\"hyprlock\")") ]; }
# Quick access applications
{ _args = [ (mkLua "mainMod .. \" + b\"") (mkLua "hl.dsp.exec_cmd(browser)") ]; }
# Scratch workspace
{ _args = [ (mkLua "mainMod .. \" + RETURN\"") (mkLua "hl.dsp.workspace.toggle_special(\"scratch\")") ]; }
{ _args = [ (mkLua "mainMod .. \" + SHIFT + RETURN\"") (mkLua "hl.dsp.window.move({ workspace = \"special:scratch\" })") ]; }
# Messaging workspace
{ _args = [ (mkLua "mainMod .. \" + M\"") (mkLua "hl.dsp.workspace.toggle_special(\"messaging\")") ]; }
# Move/resize windows with mouse and dragging
{
_args = [
(mkLua "mainMod .. \" + mouse:272\"")
(mkLua "hl.dsp.window.drag()")
{ mouse = true; }
];
}
{
_args = [
(mkLua "mainMod .. \" + mouse:273\"")
(mkLua "hl.dsp.window.resize()")
{ mouse = true; }
];
}
# Function Row Keys
{
_args = [
"XF86AudioRaiseVolume"
(mkLua "hl.dsp.exec_cmd(\"pactl -- set-sink-volume @DEFAULT_SINK@ +5%\")")
{ repeating = true; }
];
}
{
_args = [
"XF86AudioLowerVolume"
(mkLua "hl.dsp.exec_cmd(\"pactl -- set-sink-volume @DEFAULT_SINK@ -5%\")")
{ repeating = true; locked = true; }
];
}
{
_args = [
"XF86AudioMute"
(mkLua "hl.dsp.exec_cmd(\"pactl -- set-sink-mute @DEFAULT_SINK@ toggle\")")
{ repeating = true; locked = true; }
];
}
{
_args = [
"XF86MonBrightnessUp"
(mkLua "hl.dsp.exec_cmd(\"brightnessctl set 5%+\")")
{ repeating = true; locked = true; }
];
}
{
_args = [
"XF86MonBrightnessDown"
(mkLua "hl.dsp.exec_cmd(\"brightnessctl set 5%-\")")
{ repeating = true; locked = true; }
];
}
# Lid switch - generically detects the embedded (eDP*) panel on any laptop
{
_args = [
"switch:off:Lid Switch"
(mkLua "hl.dsp.exec_cmd(\"m=$(hyprctl monitors | awk '$1==\\\"Monitor\\\"{print $2; exit}'); [ -n \\\"$m\\\" ] && hyprctl keyword monitor \\\"$m, preferred, auto, auto\\\"\")")
{ locked = true; }
];
}
{
_args = [
"switch:on:Lid Switch"
(mkLua "hl.dsp.exec_cmd(\"m=$(hyprctl monitors | awk '$1==\\\"Monitor\\\"{print $2; exit}'); [ -n \\\"$m\\\" ] && hyprctl keyword monitor \\\"$m, disable\\\"\")")
{ locked = true; }
];
}
]
# Workspace 1-9 switching and moving
++ (lib.concatMap (i: [
{
_args = [
(mkLua "mainMod .. \" + ${toString i}\"")
(mkLua "hl.dsp.focus({ workspace = ${toString i} })")
];
}
{
_args = [
(mkLua "mainMod .. \" + SHIFT + ${toString i}\"")
(mkLua "hl.dsp.window.move({ workspace = ${toString i} })")
];
}
]) (lib.range 1 9))
# Workspace 10 switching and moving (mapped to key 0)
++ [
{
_args = [
(mkLua "mainMod .. \" + 0\"")
(mkLua "hl.dsp.focus({ workspace = 10 })")
];
}
{
_args = [
(mkLua "mainMod .. \" + SHIFT + 0\"")
(mkLua "hl.dsp.window.move({ workspace = 10 })")
];
}
];
# -----------------------------------------------------------------------
# 8. Workspace Rules (hl.workspace_rule)
# -----------------------------------------------------------------------
workspace_rule = [
{
workspace = "name:messaging";
on_created_empty = "[] togglegroup";
}
];
# -----------------------------------------------------------------------
# 9. Window Rules (hl.window_rule)
# -----------------------------------------------------------------------
window_rule = [
{
name = "signal-messaging";
match = { class = "Signal"; };
workspace = "special:messaging";
}
{
name = "vesktop-messaging";
match = { class = "vesktop"; };
workspace = "special:messaging";
}
{
name = "ghidra-tile";
match = { class = "ghidra-Ghidra"; };
float = false;
}
];
};
};
};
}

View File

@@ -1,9 +1,17 @@
{ pkgs, inputs, ... }:
let
quickshellPkg = if (inputs ? quickshell && inputs.quickshell ? packages && inputs.quickshell.packages ? ${pkgs.stdenv.hostPlatform.system})
then inputs.quickshell.packages.${pkgs.stdenv.hostPlatform.system}.default
else (pkgs.quickshell or pkgs.qt6.qtbase);
quickshellPkg =
if
(
inputs ? quickshell
&& inputs.quickshell ? packages
&& inputs.quickshell.packages ? ${pkgs.stdenv.hostPlatform.system}
)
then
inputs.quickshell.packages.${pkgs.stdenv.hostPlatform.system}.default
else
(pkgs.quickshell or pkgs.qt6.qtbase);
in
{
home.packages = with pkgs; [

View File

@@ -1,76 +1,83 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
treesitterParsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = builtins.attrValues pkgs.vimPlugins.nvim-treesitter.passthru.grammarPlugins;
};
treesitterParsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = builtins.attrValues pkgs.vimPlugins.nvim-treesitter.passthru.grammarPlugins;
};
in
{
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
extraPackages = with pkgs; [
# Native compilation tools & Treesitter CLI
gcc
clang
gnumake
cmake
tree-sitter
extraPackages = with pkgs; [
# Native compilation tools & Treesitter CLI
gcc
clang
gnumake
cmake
tree-sitter
# Search & Fuzzy Finding
ripgrep
fd
fzf
# Search & Fuzzy Finding
ripgrep
fd
fzf
# Archive and Network Utilities
git
curl
unzip
gnutar
gzip
# Archive and Network Utilities
git
curl
unzip
gnutar
gzip
# Language Servers, Linters & Formatters (Declarative, no Mason needed)
# Nix
nil
nixfmt
statix
# Lua
lua-language-server
stylua
# C / C++
llvmPackages_latest.clang-tools
llvmPackages_latest.lldb
# Rust
rust-analyzer
# Python
pyright
ruff
# Web / TypeScript / JavaScript / HTML / CSS / JSON
vtsls
vscode-langservers-extracted
prettier
# Shell
shfmt
shellcheck
];
# Language Servers, Linters & Formatters (Declarative, no Mason needed)
# Nix
nil
nixfmt
statix
# Lua
lua-language-server
stylua
# C / C++
llvmPackages_latest.clang-tools
llvmPackages_latest.lldb
# Rust
rust-analyzer
# Python
pyright
ruff
# Web / TypeScript / JavaScript / HTML / CSS / JSON
vtsls
vscode-langservers-extracted
prettier
# Shell
shfmt
shellcheck
];
extraWrapperArgs = [
"--set" "NVIM_TREESITTER_PARSERS" "${treesitterParsers}"
];
};
extraWrapperArgs = [
"--set"
"NVIM_TREESITTER_PARSERS"
"${treesitterParsers}"
];
};
# Symlink LazyVim configuration to ~/.config/nvim recursively
xdg.configFile."nvim" = {
source = ./config;
recursive = true;
};
# Symlink LazyVim configuration to ~/.config/nvim recursively
xdg.configFile."nvim" = {
source = ./config;
recursive = true;
};
# Symlink precompiled Treesitter parsers directly into ~/.config/nvim/parser
xdg.configFile."nvim/parser".source = "${treesitterParsers}/parser";
# Symlink precompiled Treesitter parsers directly into ~/.config/nvim/parser
xdg.configFile."nvim/parser".source = "${treesitterParsers}/parser";
}

View File

@@ -3,8 +3,7 @@
let
# Rofi script-mode indexer: exposes every executable user script
# (shell, python, whatever) so the launcher finds "everything".
rofiScripts = pkgs.writeShellScriptBin "rofi-scripts"
(builtins.readFile ./rofi/rofi-scripts.sh);
rofiScripts = pkgs.writeShellScriptBin "rofi-scripts" (builtins.readFile ./rofi/rofi-scripts.sh);
in
{
programs.rofi = {

View File

@@ -47,7 +47,7 @@ rebuild () {
shift 2>/dev/null || true
local config_dir="${FLAKE_CONFIG:-$HOME/NixOS-Configs}"
local host="hades"
local host="${REBUILD_HOST:-$(hostname)}"
local target="$config_dir#$host"
case "$action" in