Files
NixOsConfig/modules/desktop/hyprland/settings.lua
T
Claude af18420fd3 Switch to the dendritic flake-parts layout, with stubs for phase 2
flake.nix now only declares inputs and calls flake-parts with import-tree
over ./modules: every .nix file under modules/ is a flake-parts module.
Features are aspects (flake.modules.nixos.<name> and
flake.modules.homeManager.<name>); importing an aspect enables it, so the
my.* option modules and their enable flags are gone.

- Add the flake-parts glue: modules/flake/ (systems, shared meta data,
  host construction through configurations.nixos, overlays, packages,
  apps, dev shell, formatter, checks), modules/users/faumaray.nix
  (meta.owner) and modules/core/{nixpkgs,home-manager,install-facts}.nix.
  config.my is kept as one read-only derived option so install-system
  keeps working unchanged.
- Add the aspects that are already final: secrets, ssh, hyprland,
  wezterm, git, stylix, proxy-suite, gitea-runner and claude-code, and
  the desktop host (modules/hosts/desktop/{host,hardware,disks}.nix).
- Port the always-on basics to the `core` aspect (nix, boot, locale,
  networking, users), lanzaboote and plain systemd-boot to the
  `secure-boot` and `systemd-boot` aspects, and the installer ISO to
  modules/installer/iso.nix. Behaviour is unchanged; the time zone,
  default locale, XKB layouts and the firewall setting now live in
  modules/hosts/desktop/host.nix.
- Move the Lua files (Hyprland settings, binds, rules; Neovim init.lua)
  with git mv, byte-identical.
- Add bare stubs, marked STUB, for the aspects that the next phase
  ports: amd, rocm, gaming, vpn, docker, noctalia, audio, fonts, xdg,
  apps, shell and neovim. The host evaluates with them, but those
  features are not configured until they are ported.
- Remove lib/, overlays/, apps/, modules/nixos/, modules/home/,
  modules/installer/default.nix and hosts/desktop/{default,disks,home}.nix.
- flake.lock: add flake-parts, import-tree, stylix and serena with their
  transitive inputs (22 new nodes); every existing pin is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
2026-10-12 20:55:34 +00:00

183 lines
3.8 KiB
Lua

-- Monitors, environment, look and feel, input.
-- API reference: the official example (hyprland.lua) shipped with Hyprland.
local nix = require("nixvars")
------------------
---- MONITORS ----
------------------
-- Any output, native mode, placed automatically. Use mode = "highrr" to prefer
-- the highest refresh rate instead.
hl.env("AQ_DRM_DEVICES", "/dev/dri/card1:/dev/dri/card0")
hl.monitor({
output = "DP-1",
mode = "preferred",
position = "0x0",
scale = "1",
bitdepth = 10,
supports_wide_color = 1,
supports_hdr = 0,
sdrbrightness = "1.25",
sdrsaturation = "1.2",
vrr = 1,
cm = "auto",
sdr_min_luminance = 0,
sdr_max_luminance = 200,
-- icc = "/home/faumaray/Documents/ICC Profile_20240726/CxxG5xT.icm",
sdr_eotf = "gamma22",
})
-- monitor = DP-2, preferred, -2560x0, 1, bitdepth, 10, vrr, 1, icc, /home/faumaray/Documents/ICC Profile_20240726/ASUS_Display_sRGB.icc
hl.monitor({
output = "DP-2",
mode = "2560x1440@144",
position = "-2560x0",
-- position = -1440x0
scale = "1",
-- transform = 1
bitdepth = 10,
supports_wide_color = 1,
supports_hdr = 0,
-- sdrbrightness = 1.0,
-- sdrsaturation = 1.1,
vrr = 1,
sdr_eotf = "gamma22",
cm = "auto",
-- icc = "/home/faumaray/Documents/ICC Profile_20240726/ASUS_Display_sRGB.icm",
-- sdr_min_luminance = 0,
-- sdr_max_luminance = 50
})
-------------------------------
---- ENVIRONMENT VARIABLES ----
-------------------------------
hl.env("XCURSOR_SIZE", tostring(nix.cursorSize))
hl.env("HYPRCURSOR_SIZE", tostring(nix.cursorSize))
if nix.cursorTheme ~= "" then
hl.env("XCURSOR_THEME", nix.cursorTheme)
end
-----------------------
---- LOOK AND FEEL ----
-----------------------
-- Gaps, rounding, shadow and blur follow the Noctalia documentation so the
-- shell's bar and panels sit well on top of the windows.
hl.config({
cursor = {
no_hardware_cursors = 0,
},
xwayland = {
force_zero_scaling = false,
create_abstract_socket = true,
},
render = {
send_content_type = true,
direct_scanout = 0,
-- cm_fs_passthrough = 1,
cm_auto_hdr = 0,
cm_sdr_eotf = 1,
},
quirks = {
prefer_hdr = 0,
},
general = {
gaps_in = 5,
gaps_out = 10,
border_size = 2,
col = {
-- Catppuccin Mocha: mauve to blue, surface1 when unfocused.
active_border = "rgba(33ccffee)",
inactive_border = "rgba(595959aa)",
},
resize_on_border = true,
-- Only windows with the `immediate` rule (see 30-rules.lua) tear.
allow_tearing = true,
layout = "dwindle",
},
decoration = {
rounding = 20,
rounding_power = 2,
shadow = {
enabled = true,
range = 4,
render_power = 3,
color = 0xee1a1a1a,
},
blur = {
enabled = true,
size = 3,
passes = 2,
vibrancy = 0.1696,
},
},
animations = {
enabled = true,
},
dwindle = {
preserve_split = true,
},
master = {
new_status = "master",
},
misc = {
-- Noctalia draws the wallpaper.
force_default_wallpaper = 0,
disable_hyprland_logo = true,
},
ecosystem = {
no_update_news = true,
no_donation_nag = true,
},
})
---------------
---- INPUT ----
---------------
hl.config({
input = {
kb_layout = nix.kbLayout,
kb_options = nix.kbOptions,
numlock_by_default = true,
follow_mouse = 1,
sensitivity = 0,
},
})
-- Persistent workspaces keep the empty ones visible in Noctalia's indicator.
for i = 1, 5 do
hl.workspace_rule({ workspace = tostring(i), persistent = true })
end
for i = 1, 10 do
if i % 2 == 0 then
if i <= 5 then
hl.workspace_rule({ workspace = tostring(i), persistent = true, monitor = "DP-2" })
else
hl.workspace_rule({ workspace = tostring(i), persistent = false, monitor = "DP-2" })
end
else
if i <= 5 then
hl.workspace_rule({ workspace = tostring(i), persistent = true, monitor = "DP-1" })
else
hl.workspace_rule({ workspace = tostring(i), persistent = false, monitor = "DP-1" })
end
end
end