feat(hyprland): add optional lua-config package stack

This commit is contained in:
2026-04-17 13:12:50 -07:00
committed by Kat Huang
parent 7a593f4418
commit 7e6907a0af
3 changed files with 643 additions and 127 deletions

515
nixos/flake.lock generated
View File

@@ -60,6 +60,39 @@
"type": "github"
}
},
"aquamarine_2": {
"inputs": {
"hyprutils": [
"hyprland-lua-config",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland-lua-config",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1775558810,
"narHash": "sha256-fy95EdPnqQlpbP8+rk0yWKclWShCUS5VKs6P7/1MF2c=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "7371b669b22aa2af980f913fc312a786d2f1abb2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"caelestia-cli": {
"inputs": {
"caelestia-shell": [
@@ -273,6 +306,22 @@
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1767039857,
@@ -288,7 +337,7 @@
"type": "github"
}
},
"flake-compat_4": {
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@@ -588,6 +637,28 @@
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"hyprland-lua-config",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_3": {
"inputs": {
"nixpkgs": [
"taffybar",
@@ -635,7 +706,7 @@
"hercules-ci-effects_2": {
"inputs": {
"flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1701009247,
@@ -722,6 +793,35 @@
"type": "github"
}
},
"hyprcursor_2": {
"inputs": {
"hyprlang": [
"hyprland-lua-config",
"hyprlang"
],
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1772461003,
"narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprgraphics": {
"inputs": {
"hyprutils": [
@@ -751,6 +851,35 @@
"type": "github"
}
},
"hyprgraphics_2": {
"inputs": {
"hyprutils": [
"hyprland-lua-config",
"hyprutils"
],
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1775496928,
"narHash": "sha256-Ds759WU03mGWtu3I43J+5GF5Ni8TvF+GYQUFD+fVeMo=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "cf95d93d17baa18f1d9b016b3afe27f820521a6e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
@@ -830,6 +959,85 @@
"type": "github"
}
},
"hyprland-guiutils_2": {
"inputs": {
"aquamarine": [
"hyprland-lua-config",
"aquamarine"
],
"hyprgraphics": [
"hyprland-lua-config",
"hyprgraphics"
],
"hyprlang": [
"hyprland-lua-config",
"hyprlang"
],
"hyprtoolkit": "hyprtoolkit_2",
"hyprutils": [
"hyprland-lua-config",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland-lua-config",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1774710575,
"narHash": "sha256-p7Rcw13+gA4Z9EI3oGYe3neQ3FqyOOfZCleBTfhJ95Q=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "0703df899520001209646246bef63358c9881e36",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"type": "github"
}
},
"hyprland-lua-config": {
"inputs": {
"aquamarine": "aquamarine_2",
"hyprcursor": "hyprcursor_2",
"hyprgraphics": "hyprgraphics_2",
"hyprland-guiutils": "hyprland-guiutils_2",
"hyprland-protocols": "hyprland-protocols_2",
"hyprlang": "hyprlang_2",
"hyprutils": "hyprutils_2",
"hyprwayland-scanner": "hyprwayland-scanner_2",
"hyprwire": "hyprwire_2",
"nixpkgs": "nixpkgs_3",
"pre-commit-hooks": "pre-commit-hooks_2",
"systems": "systems_2",
"xdph": "xdph_2"
},
"locked": {
"lastModified": 1776451806,
"narHash": "sha256-iazLQjRsKr6IYlpEXg7ifkNRXYba+ovd9m9HR1Tyrbk=",
"ref": "refs/pull/13817/head",
"rev": "f1bedcc3071a531d7d67cc631da1b973779edb0a",
"revCount": 7158,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
},
"original": {
"ref": "refs/pull/13817/head",
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
}
},
"hyprland-plugins": {
"inputs": {
"hyprland": [
@@ -886,6 +1094,31 @@
"type": "github"
}
},
"hyprland-protocols_2": {
"inputs": {
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1772460177,
"narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
@@ -915,6 +1148,35 @@
"type": "github"
}
},
"hyprlang_2": {
"inputs": {
"hyprutils": [
"hyprland-lua-config",
"hyprutils"
],
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1772459629,
"narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "7615ee388de18239a4ab1400946f3d0e498a8186",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprscratch": {
"inputs": {
"nixpkgs": [
@@ -988,6 +1250,58 @@
"type": "github"
}
},
"hyprtoolkit_2": {
"inputs": {
"aquamarine": [
"hyprland-lua-config",
"hyprland-guiutils",
"aquamarine"
],
"hyprgraphics": [
"hyprland-lua-config",
"hyprland-guiutils",
"hyprgraphics"
],
"hyprlang": [
"hyprland-lua-config",
"hyprland-guiutils",
"hyprlang"
],
"hyprutils": [
"hyprland-lua-config",
"hyprland-guiutils",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland-lua-config",
"hyprland-guiutils",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland-lua-config",
"hyprland-guiutils",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"hyprland-guiutils",
"systems"
]
},
"locked": {
"lastModified": 1772462885,
"narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "9af245a69fa6b286b88ddfc340afd288e00a6998",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprtoolkit",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
@@ -1013,6 +1327,31 @@
"type": "github"
}
},
"hyprutils_2": {
"inputs": {
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1774911391,
"narHash": "sha256-c4YVwO33Mmw+FIV8E0u3atJZagHvGTJ9Jai6RtiB8rE=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "e6caa3d4d1427eedbdf556cf4ceb70f2d9c0b56d",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
@@ -1038,6 +1377,31 @@
"type": "github"
}
},
"hyprwayland-scanner_2": {
"inputs": {
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1772459835,
"narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "0a692d4a645165eebd65f109146b8861e3a925e7",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"hyprwire": {
"inputs": {
"hyprutils": [
@@ -1067,6 +1431,35 @@
"type": "github"
}
},
"hyprwire_2": {
"inputs": {
"hyprutils": [
"hyprland-lua-config",
"hyprutils"
],
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1775414057,
"narHash": "sha256-mDpHnf+MkdOxEqIM1TnckYYh9p1SXR8B3KQfNZ12M8s=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "86012ee01b0fdd8bf3101ef38816f2efbee42490",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwire",
"type": "github"
}
},
"imalison-taffybar": {
"inputs": {
"flake-utils": [
@@ -1159,10 +1552,10 @@
},
"nix": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"flake-parts": "flake-parts",
"git-hooks-nix": "git-hooks-nix",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"nixpkgs-23-11": "nixpkgs-23-11",
"nixpkgs-regression": "nixpkgs-regression"
},
@@ -1219,7 +1612,7 @@
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"nixpkgs": [
"nixpkgs"
]
@@ -1337,6 +1730,22 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1775423009,
"narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1771903837,
"narHash": "sha256-jEA8WggGKtMFeNeCKq3NK8cLEjJmG6/RLUElYYbBZ0E=",
@@ -1349,7 +1758,7 @@
"url": "https://channels.nixos.org/nixos-25.11/nixexprs.tar.xz"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
@@ -1365,7 +1774,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1697723726,
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
@@ -1381,7 +1790,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1703255338,
"narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=",
@@ -1401,7 +1810,7 @@
"inputs": {
"flake-parts": "flake-parts_4",
"hercules-ci-effects": "hercules-ci-effects_2",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_7",
"osx-kvm": "osx-kvm"
},
"locked": {
@@ -1564,8 +1973,31 @@
},
"pre-commit-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_2",
"gitignore": "gitignore_2",
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775036584,
"narHash": "sha256-zW0lyy7ZNNT/x8JhzFHBsP2IPx7ATZIPai4FJj12BgU=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "4e0eb042b67d863b1b34b3f64d52ceb9cd926735",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks_3": {
"inputs": {
"flake-compat": "flake-compat_5",
"gitignore": "gitignore_3",
"nixpkgs": [
"nixpkgs"
]
@@ -1644,6 +2076,7 @@
"home-manager": "home-manager",
"hy3": "hy3",
"hyprland": "hyprland",
"hyprland-lua-config": "hyprland-lua-config",
"hyprland-plugins": "hyprland-plugins",
"hyprscratch": "hyprscratch",
"imalison-taffybar": "imalison-taffybar",
@@ -1653,12 +2086,12 @@
"nixified-ai": "nixified-ai",
"nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"nixtheplanet": "nixtheplanet",
"notifications-tray-icon": "notifications-tray-icon",
"org-agenda-api": "org-agenda-api",
"railbird-secrets": "railbird-secrets",
"systems": "systems_2",
"systems": "systems_3",
"taffybar": "taffybar",
"vscode-server": "vscode-server",
"xmonad": "xmonad",
@@ -1735,6 +2168,21 @@
}
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -1808,7 +2256,7 @@
"taffybar",
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks_2"
"pre-commit-hooks": "pre-commit-hooks_3"
},
"locked": {
"lastModified": 1764753633,
@@ -1865,6 +2313,47 @@
"type": "github"
}
},
"xdph_2": {
"inputs": {
"hyprland-protocols": [
"hyprland-lua-config",
"hyprland-protocols"
],
"hyprlang": [
"hyprland-lua-config",
"hyprlang"
],
"hyprutils": [
"hyprland-lua-config",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland-lua-config",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland-lua-config",
"nixpkgs"
],
"systems": [
"hyprland-lua-config",
"systems"
]
},
"locked": {
"lastModified": 1773601989,
"narHash": "sha256-2tJf/CQoHApoIudxHeJye+0Ii7scR0Yyi7pNiWk0Hn8=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "a9b862d1aa000a676d310cc62d249f7ad726233d",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"xmonad": {
"inputs": {
"flake-utils": [

View File

@@ -85,6 +85,11 @@
url = "git+https://github.com/hyprwm/Hyprland?submodules=1&ref=refs/tags/v0.53.0";
};
hyprland-lua-config = {
# Experimental Lua config branch from PR 13817.
url = "git+https://github.com/hyprwm/Hyprland?submodules=1&ref=refs/pull/13817/head";
};
hy3 = {
url = "github:outfoxxed/hy3?ref=hl0.53.0";
inputs.hyprland.follows = "hyprland";

View File

@@ -1,14 +1,19 @@
{ config, pkgs, makeEnable, inputs, ... }:
{ config, pkgs, lib, makeEnable, inputs, ... }:
let
cfg = config.myModules.hyprland;
system = pkgs.stdenv.hostPlatform.system;
enableExternalPluginPackages = !cfg.useLuaConfigBranch;
hyprlandInput =
if cfg.useLuaConfigBranch
then inputs.hyprland-lua-config
else inputs.hyprland;
hyprexpoPatched = inputs.hyprland-plugins.packages.${system}.hyprexpo.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
./patches/hyprexpo-pr-612-workspace-numbers.patch
./patches/hyprexpo-pr-616-bring-mode.patch
];
});
in
makeEnable config "myModules.hyprland" true {
enabledModule = makeEnable config "myModules.hyprland" true {
myModules.taffybar.enable = true;
# Needed for hyprlock authentication without PAM fallback warnings.
@@ -16,8 +21,8 @@ makeEnable config "myModules.hyprland" true {
programs.hyprland = {
enable = true;
# Use Hyprland from the flake for proper plugin compatibility
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# Keep Hyprland and plugins on a matched flake input for ABI compatibility.
package = hyprlandInput.packages.${system}.hyprland;
# Let UWSM manage the Hyprland session targets
withUWSM = true;
};
@@ -128,13 +133,30 @@ makeEnable config "myModules.hyprland" true {
nwg-displays # GUI monitor arrangement
mpv # Graphical screensaver payload
# hy3 plugin from flake (properly built against matching Hyprland)
inputs.hy3.packages.${pkgs.stdenv.hostPlatform.system}.hy3
# Hyprexpo plugin from hyprland-plugins (workspace overview)
hyprexpoPatched
# For scripts
jq
] ++ lib.optionals enableExternalPluginPackages [
# External plugin packages are pinned to the stable 0.53 stack.
# PR 13817's Hyprland branch builds, but hy3 / hyprexpo do not yet build
# against it, so keep them out of the experimental Lua branch for now.
inputs.hy3.packages.${system}.hy3
hyprexpoPatched
];
};
in
enabledModule // {
options = lib.recursiveUpdate enabledModule.options {
myModules.hyprland.useLuaConfigBranch = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Use the experimental Hyprland PR 13817 Lua-config branch for the
Hyprland package itself. Third-party plugins are left on the stable
stack and are excluded from the experimental package set because current
`hy3` and `hyprexpo` sources do not build against PR 13817 yet. The
existing `hyprland.conf` remains active until a sibling `hyprland.lua`
file is added.
'';
};
};
}