diff --git a/flake.lock b/flake.lock --- a/flake.lock +++ b/flake.lock @@ -616,6 +616,36 @@ "type": "github" } }, + "hylix": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "import-tree": [ + "import-tree" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems", + "treefmt-nix": [ + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1780279599, + "narHash": "sha256-ZCj+xW1MTm4fiDWalREvbDVG+UFM9RmhObeHQ49sIHI=", + "owner": "adam01110", + "repo": "hylix", + "rev": "ee990d20a41b80b2294631c64d6db0630e0b3c8a", + "type": "github" + }, + "original": { + "owner": "adam01110", + "repo": "hylix", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -687,7 +717,7 @@ "hyprwire": "hyprwire", "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems", + "systems": "systems_2", "xdph": "xdph" }, "locked": { @@ -1073,11 +1103,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1780084541, - "narHash": "sha256-1dfrj9KRVjYdRQV677wHJVqSi1+IseAofINIIpPO+7E=", + "lastModified": 1780253365, + "narHash": "sha256-wcJ+6+Z+mfzBjClI0XsjOoGSW6o1RldVj6UETLzK+GQ=", "owner": "xddxdd", "repo": "nix-cachyos-kernel", - "rev": "bc4719a00b3e52764b947cb3c7f15a8b8769432e", + "rev": "236462fb93cb56e26e6a6801ba5edb6dad66be0d", "type": "github" }, "original": { @@ -1131,11 +1161,11 @@ ] }, "locked": { - "lastModified": 1779604987, - "narHash": "sha256-ZQ5z+fVhxYKtIFwtqGp5O0PD84BM1riASvqDaN5Xs+s=", + "lastModified": 1780210899, + "narHash": "sha256-4axz3OBPTKa6LIkXV8n0lc63MQU+et2CB5DGobEAi6k=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "8fba98c80b48fa013820e0163c5096922fea4ddd", + "rev": "97df9dc0b7c924344b793a15c1e8e4522ebb854e", "type": "github" }, "original": { @@ -1158,17 +1188,17 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2", + "systems": "systems_3", "treefmt-nix": [ "treefmt-nix" ] }, "locked": { - "lastModified": 1780022359, - "narHash": "sha256-7J0o3HP5NiyEfz4jDk/exKPXUhq18sVMOoacyzknu1w=", + "lastModified": 1780279278, + "narHash": "sha256-5+fPFdAOvGFNbFLPNcVDXbFVcO7BO89QGxhpHIqUBFU=", "owner": "adam01110", "repo": "nix-userstyles", - "rev": "839544e33428a069c7c64370bd9c4ca7646432ff", + "rev": "9d7aa5a44cb3ee15786ae1f117b0c7f1405e67ab", "type": "github" }, "original": { @@ -1187,42 +1217,16 @@ "nixpkgs-nixcord": "nixpkgs-nixcord" }, "locked": { - "lastModified": 1780138931, - "narHash": "sha256-hiF5Dnufa8jtENCnk0p6yjDaA01d2yCwiTMpxfKDCN4=", + "lastModified": 1780158792, + "narHash": "sha256-tAGrRIQOi11zwl7UOLKkNsy3owVTE+/lDU1MJT9K2Qw=", "owner": "kaylorben", "repo": "nixcord", - "rev": "f8d55b5f6ce6548f31fa6941c66b78e4ae23c5de", + "rev": "d0a08d06b3a00b1038b1780366180068af7c1489", "type": "github" }, "original": { "owner": "kaylorben", "repo": "nixcord", - "type": "github" - } - }, - "nixhypr": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "nixpkgs": [ - "nixpkgs" - ], - "treefmt-nix": [ - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1778139329, - "narHash": "sha256-Se3RyYawVa5c98wKYBiDOX7+2vQJaTSxCnWjk6sKb9o=", - "owner": "karol-broda", - "repo": "nixhypr", - "rev": "983159d34bb7a46c0bfaf9491ea00290b102210e", - "type": "github" - }, - "original": { - "owner": "karol-broda", - "repo": "nixhypr", "type": "github" } }, @@ -1335,11 +1339,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1780011192, - "narHash": "sha256-luHrZG6I7Mwdt413XoDOYBpp9z1z6X23/5SNktwjM+k=", + "lastModified": 1780206209, + "narHash": "sha256-33WNQ5sssy+8+xhUz953aEnjR1Oh828j0DgLU1TfMqE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3242faf14b7611a62ce0f0071619438a08b65c12", + "rev": "45cf63e030188dd38532669b2450182bfc2d4653", "type": "github" }, "original": { @@ -1407,15 +1411,15 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3", + "systems": "systems_4", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1779588472, - "narHash": "sha256-CVonDVo41DqdqS/kNeXFatwEuTltyXcppm9zkVOnrsM=", + "lastModified": 1780194487, + "narHash": "sha256-M+YtjKCTkHrkplNaKVyaxfa8hAWjRF6wFOUBAZvxQ4U=", "owner": "noctalia-dev", "repo": "noctalia-qs", - "rev": "70fea8a39a908e395de63024a4dfdb829bff1ffe", + "rev": "07398e12b54f194e3a2d47c87e3fd10b8eeaa27d", "type": "github" }, "original": { @@ -1434,11 +1438,11 @@ ] }, "locked": { - "lastModified": 1780175453, - "narHash": "sha256-UipLVrwxjoe2FDWJFlF+DkD+axkSl7wdEUTGFvjni4E=", + "lastModified": 1780281641, + "narHash": "sha256-M/+hUKoKbHXpV0xGVfELbN1Ds1aoe3pL5p5/t46YhVo=", "owner": "nix-community", "repo": "NUR", - "rev": "8988ccefb87af04b296c4d1cb2127a15ffb86d4d", + "rev": "30f9ae2f04174de63ba8bcf3580ca90843b28a01", "type": "github" }, "original": { @@ -1458,7 +1462,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1779458887, @@ -1486,7 +1490,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_5", + "systems": "systems_6", "treefmt-nix": [ "treefmt-nix" ] @@ -1559,6 +1563,7 @@ "flake-file": "flake-file", "flake-parts": "flake-parts_2", "home-manager": "home-manager", + "hylix": "hylix", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "import-tree": "import-tree", @@ -1568,7 +1573,6 @@ "nix-index-database": "nix-index-database", "nix-userstyles": "nix-userstyles", "nixcord": "nixcord", - "nixhypr": "nixhypr", "nixpkgs": "nixpkgs_6", "noctalia": "noctalia", "noctalia-qs": "noctalia-qs", @@ -1650,14 +1654,14 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_6" + "systems": "systems_7" }, "locked": { - "lastModified": 1779824049, - "narHash": "sha256-dWHVUjP03KSVG1PaLKA6j9EdxWSxSQvipMUIcSyuA/U=", + "lastModified": 1780213729, + "narHash": "sha256-rdeBztPA6tiKp6gG4ihZAzeYGC9mYa2tAU4UIOLcZM0=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "1362178e5f5f7a848c49fe9dee004ef8824f100a", + "rev": "c679f3fa9fbe86903486a8f7ad71f99e26481d71", "type": "github" }, "original": { @@ -1683,18 +1687,18 @@ "nur": [ "nur" ], - "systems": "systems_7", + "systems": "systems_8", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", "tinted-tmux": "tinted-tmux", "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1780079634, - "narHash": "sha256-VVyCrzwLitvxZGx48FgzvlbLYGQU99GsaQnZmwqZoUo=", + "lastModified": 1780256506, + "narHash": "sha256-wEXN/OoZt9HfsKBL6694p2Y9xRlwfUbdn/M107U8fVU=", "owner": "danth", "repo": "stylix", - "rev": "ca07e0644716a7c13e91c6d92d169fc81889c589", + "rev": "8ed48a41087feeb66372ff718021a9512fc552b3", "type": "github" }, "original": { @@ -1705,36 +1709,21 @@ }, "systems": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, "systems_2": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", @@ -1748,7 +1737,7 @@ "type": "github" } }, - "systems_4": { + "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1760,6 +1749,21 @@ "original": { "owner": "nix-systems", "repo": "default", + "type": "github" + } + }, + "systems_4": { + "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" } }, @@ -1794,6 +1798,21 @@ } }, "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_8": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1900,11 +1919,11 @@ ] }, "locked": { - "lastModified": 1775636079, - "narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=", + "lastModified": 1780220602, + "narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba", + "rev": "db947814a175b7ca6ded66e21383d938df01c227", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -51,10 +51,12 @@ url = "github:kaylorben/nixcord"; inputs.flake-parts.follows = "flake-parts"; }; - nixhypr = { - url = "github:karol-broda/nixhypr"; + hylix = { + url = "github:adam01110/hylix"; inputs = { - hyprland.follows = "hyprland"; + flake-file.follows = "flake-file"; + flake-parts.follows = "flake-parts"; + import-tree.follows = "import-tree"; nixpkgs.follows = "nixpkgs"; treefmt-nix.follows = "treefmt-nix"; }; diff --git a/lib/hylix.nix b/lib/hylix.nix new file mode 100644 --- /dev/null +++ b/lib/hylix.nix @@ -0,0 +1,10 @@ +_: { + mkHylixBindGroup = category: binds: { + inherit + # keep-sorted start + binds + category + # keep-sorted end + ; + }; +} diff --git a/lib/nixhypr.nix b/lib/nixhypr.nix deleted file mode 100644 --- a/lib/nixhypr.nix +++ /dev/null @@ -1,16 +0,0 @@ -_: { - mkNixhyprBind = description: keys: dispatcher: - { - inherit description keys; - } - // dispatcher; - - mkNixhyprBindGroup = category: binds: { - inherit - # keep-sorted start - binds - category - # keep-sorted end - ; - }; -} diff --git a/modules/desktop/tablet.nix b/modules/desktop/tablet.nix --- a/modules/desktop/tablet.nix +++ b/modules/desktop/tablet.nix @@ -9,17 +9,18 @@ inherit (lib) # keep-sorted start - attrNames filter head mkIf # keep-sorted end ; - monitors = config.hyprland.monitors or {}; - candidates = filter ( - name: (monitors.${name}.position or null) == "0x0" - ) (attrNames monitors); + monitors = config.programs.hylix.monitors or []; + candidates = + filter ( + monitor: (monitor.position or null) == "0x0" + ) + monitors; in { imports = [ { @@ -29,13 +30,10 @@ ]; config = mkIf (candidates != []) { - programs.nixhypr.devices = [ - { - name = "opentabletdriver-virtual-artist-tablet"; - output = head candidates; - transform = 0; - } - ]; + programs.hylix.settings.input.tablet = { + inherit ((head candidates)) output; + transform = 0; + }; }; }; diff --git a/modules/development/treefmt.nix b/modules/development/treefmt.nix --- a/modules/development/treefmt.nix +++ b/modules/development/treefmt.nix @@ -44,7 +44,6 @@ "*.mdx" ]; - # Keep sops and direnv files out of formatting and linting. global.excludes = [ # keep-sorted start ".direnv/*" diff --git a/modules/nixhypr/animations.nix b/modules/nixhypr/animations.nix deleted file mode 100644 --- a/modules/nixhypr/animations.nix +++ /dev/null @@ -1,159 +0,0 @@ -{inputs, ...}: { - flake.modules.homeManager.nixhypr = { - lib, - config, - ... - }: let - inherit - (lib) - # keep-sorted start - concatStringsSep - filterAttrs - mapAttrsToList - mkIf - mkMerge - mkOption - mkOrder - optionalAttrs - types - # keep-sorted end - ; - - nixhyprLib = import "${inputs.nixhypr}/lib" {inherit lib;}; - inherit (nixhyprLib) ordering toLua; - - cfg = config.programs.nixhypr; - - curveType = types.submodule { - options = { - type = mkOption { - description = "Curve type."; - type = types.enum ["bezier" "spring"]; - }; - - points = mkOption { - default = null; - description = "Bezier control points [x1, y1, x2, y2]."; - type = types.nullOr (types.listOf types.float); - }; - - mass = mkOption { - default = null; - description = "Spring mass."; - type = types.nullOr (types.either types.int types.float); - }; - - stiffness = mkOption { - default = null; - description = "Spring stiffness."; - type = types.nullOr (types.either types.int types.float); - }; - - dampening = mkOption { - default = null; - description = "Spring dampening."; - type = types.nullOr (types.either types.int types.float); - }; - }; - }; - - animationType = types.submodule { - options = { - leaf = mkOption { - description = "Animation leaf name."; - type = types.str; - }; - - enabled = mkOption { - default = true; - description = "Whether this animation is enabled."; - type = types.bool; - }; - - speed = mkOption { - default = null; - description = "Animation speed."; - type = types.nullOr (types.either types.int types.float); - }; - - bezier = mkOption { - default = null; - description = "Name of a bezier curve to use."; - type = types.nullOr types.str; - }; - - spring = mkOption { - default = null; - description = "Name of a spring curve to use."; - type = types.nullOr types.str; - }; - - style = mkOption { - default = null; - description = "Animation style."; - type = types.nullOr types.str; - }; - }; - }; - - buildCurve = name: curve: let - table = - if curve.type == "bezier" - then { - type = "bezier"; - points = [ - [ - (builtins.elemAt curve.points 0) - (builtins.elemAt curve.points 1) - ] - [ - (builtins.elemAt curve.points 2) - (builtins.elemAt curve.points 3) - ] - ]; - } - else - filterAttrs (_: value: value != null) { - inherit (curve) dampening mass stiffness type; - }; - in "hl.curve(\"${name}\", ${toLua table})"; - - curveLines = concatStringsSep "\n" (mapAttrsToList buildCurve cfg.animations.curves); - - buildAnimation = animation: let - table = - {inherit (animation) enabled leaf;} - // optionalAttrs (animation.speed != null) {inherit (animation) speed;} - // optionalAttrs (animation.bezier != null) {inherit (animation) bezier;} - // optionalAttrs (animation.spring != null) {inherit (animation) spring;} - // optionalAttrs (animation.style != null) {inherit (animation) style;}; - in "hl.animation(${toLua table})"; - - animationLines = concatStringsSep "\n" (map buildAnimation cfg.animations.animations); - in { - disabledModules = ["${inputs.nixhypr}/modules/animations.nix"]; - - options.programs.nixhypr.animations = { - curves = mkOption { - default = {}; - description = "Named animation curves."; - type = types.attrsOf curveType; - }; - - animations = mkOption { - default = []; - description = "Animation configurations."; - type = types.listOf animationType; - }; - }; - - config = mkMerge [ - (mkIf (cfg.animations.curves != {}) { - programs.nixhypr._generatedConfig = mkOrder ordering.curves curveLines; - }) - (mkIf (cfg.animations.animations != []) { - programs.nixhypr._generatedConfig = mkOrder ordering.animations animationLines; - }) - ]; - }; -} diff --git a/modules/nixhypr/binds.nix b/modules/nixhypr/binds.nix deleted file mode 100644 --- a/modules/nixhypr/binds.nix +++ /dev/null @@ -1,194 +0,0 @@ -{inputs, ...}: { - flake.modules.homeManager.nixhypr = { - # keep-sorted start - config, - lib, - # keep-sorted end - ... - }: let - inherit - (lib) - # keep-sorted start - concatMap - concatStringsSep - filterAttrs - foldl' - mkIf - mkOption - mkOrder - types - # keep-sorted end - ; - - nixhyprLib = import "${inputs.nixhypr}/lib" {inherit lib;}; - inherit (nixhyprLib) ordering toLua; - - cfg = config.programs.nixhypr; - - bindType = types.submodule { - options = { - # keep-sorted start block=yes newline_separated=yes - action = mkOption { - description = "Hyprland dispatcher action, such as `window.close` or `focus`."; - - type = types.nullOr types.str; - default = null; - }; - - args = mkOption { - description = "Arguments for the action dispatcher."; - - type = types.anything; - default = null; - }; - - category = mkOption { - description = "Optional Noctalia keybind-cheatsheet category."; - - type = types.nullOr types.str; - default = null; - }; - - description = mkOption { - description = "Optional bind description."; - - type = types.nullOr types.str; - default = null; - }; - - exec = mkOption { - description = "Command to execute, as shorthand for `hl.dsp.exec_cmd`."; - - type = types.nullOr types.str; - default = null; - }; - - keys = mkOption { - description = "Key combination, such as `[ \"SUPER\" \"q\" ]`."; - - type = types.listOf types.str; - }; - - lua = mkOption { - description = "Raw Lua dispatcher expression."; - - type = types.nullOr types.str; - default = null; - }; - - options = mkOption { - description = "Bind options, such as `repeating`, `locked`, or `description`."; - - type = types.attrsOf types.anything; - default = {}; - }; - # keep-sorted end - }; - }; - - bindGroupType = types.submodule { - options = { - # keep-sorted start block=yes newline_separated=yes - binds = mkOption { - description = "Keybindings in this group."; - - type = types.listOf bindType; - default = []; - }; - - category = mkOption { - description = "Noctalia keybind-cheatsheet category."; - - type = types.str; - }; - # keep-sorted end - }; - }; - - cleanAttrs = filterAttrs (_: value: value != null); - - buildDispatcher = bind: - if bind.exec != null - then "hl.dsp.exec_cmd(${toLua bind.exec})" - else if bind.lua != null - then bind.lua - else if bind.action != null - then let - argsStr = - if bind.args != null - then "(${toLua bind.args})" - else "()"; - in "hl.dsp.${bind.action}${argsStr}" - else throw "bind must have one of: exec, action, lua"; - - buildBindLine = bind: let - keysStr = concatStringsSep " + " bind.keys; - dispatcher = buildDispatcher bind; - bindOptions = cleanAttrs (bind.options // {inherit (bind) description;}); - in - if bindOptions != {} - then "hl.bind(${toLua keysStr}, ${dispatcher}, ${toLua bindOptions})" - else "hl.bind(${toLua keysStr}, ${dispatcher})"; - - buildBind = state: bind: let - categoryChanged = bind.category != null && bind.category != state.category; - nextIndex = - if categoryChanged - then state.index + 1 - else state.index; - categoryLine = - if categoryChanged - then ["-- ${toString nextIndex}. ${bind.category}"] - else []; - in { - category = - if categoryChanged - then bind.category - else state.category; - index = nextIndex; - lines = state.lines ++ categoryLine ++ [(buildBindLine bind)]; - }; - - groupedBinds = concatMap (group: - map (bind: - bind - // { - category = - if bind.category != null - then bind.category - else group.category; - }) - group.binds) - cfg.bindGroups; - - allBinds = cfg.binds ++ groupedBinds; - - built = - foldl' buildBind { - category = null; - index = 0; - lines = []; - } - allBinds; - in { - disabledModules = ["${inputs.nixhypr}/modules/binds.nix"]; - - options.programs.nixhypr.binds = mkOption { - description = "Keybindings."; - - type = types.listOf bindType; - default = []; - }; - - options.programs.nixhypr.bindGroups = mkOption { - description = "Grouped keybindings."; - - type = types.listOf bindGroupType; - default = []; - }; - - config = mkIf (allBinds != []) { - programs.nixhypr._generatedConfig = mkOrder ordering.binds (concatStringsSep "\n" built.lines); - }; - }; -} diff --git a/modules/nixhypr/default.nix b/modules/nixhypr/default.nix deleted file mode 100644 --- a/modules/nixhypr/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{inputs, ...}: { - flake.modules.homeManager.nixhypr = { - # keep-sorted start - config, - lib, - # keep-sorted end - ... - }: let - inherit - (lib) - # keep-sorted start - concatStringsSep - mkEnableOption - mkIf - mkOption - types - # keep-sorted end - ; - - cfg = config.programs.nixhypr; - in { - imports = ["${inputs.nixhypr}/modules"]; - - options.programs.nixhypr = { - enable = mkEnableOption "nixhypr hyprland lua config generator"; - - extraLuaSnippets = mkOption { - description = "Lua snippets concatenated into nixhypr's extraLua."; - - type = types.listOf types.lines; - default = []; - }; - }; - - config = mkIf cfg.enable { - wayland.windowManager.hyprland = { - configType = "lua"; - extraConfig = cfg._generatedConfig; - }; - - programs.nixhypr.extraLua = concatStringsSep "\n" cfg.extraLuaSnippets; - }; - }; -} diff --git a/modules/desktop/hyprland/appearance.nix b/modules/desktop/hyprland/appearance.nix --- a/modules/desktop/hyprland/appearance.nix +++ b/modules/desktop/hyprland/appearance.nix @@ -2,7 +2,7 @@ flake.modules.homeManager.hyprland = {lib, ...}: let inherit ((import "${inputs.hyprland}/nix/lib.nix" lib)) toHyprlang; in { - programs.nixhypr = { + programs.hylix = { settings = { # Window decoration options including blur and shadow. decoration = { diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix --- a/modules/desktop/hyprland/default.nix +++ b/modules/desktop/hyprland/default.nix @@ -2,11 +2,12 @@ flake-file.inputs = { hyprland.url = "github:hyprwm/Hyprland?ref=v0.55.2"; - nixhypr = { - url = "github:karol-broda/nixhypr"; + hylix = { + url = "github:adam01110/hylix"; inputs = { # keep-sorted start - hyprland.follows = "hyprland"; + flake-parts.follows = "flake-parts"; + import-tree.follows = "import-tree"; nixpkgs.follows = "nixpkgs"; treefmt-nix.follows = "treefmt-nix"; # keep-sorted end @@ -44,11 +45,17 @@ }; }; - flake.modules.homeManager.hyprland = {self, ...}: { - imports = with self.modules.homeManager; [ + flake.modules.homeManager.hyprland = { + # keep-sorted start + inputs, + self, + # keep-sorted end + ... + }: { + imports = [ # keep-sorted start - nixhypr - uwsm + inputs.hylix.homeManagerModules.default + self.modules.homeManager.uwsm # keep-sorted end ]; @@ -61,7 +68,7 @@ portalPackage = null; }; - programs.nixhypr.enable = true; + programs.hylix.enable = true; }; }; } diff --git a/modules/desktop/hyprland/general.nix b/modules/desktop/hyprland/general.nix --- a/modules/desktop/hyprland/general.nix +++ b/modules/desktop/hyprland/general.nix @@ -1,6 +1,6 @@ { flake.modules.homeManager.hyprland = { - programs.nixhypr.settings = { + programs.hylix.settings = { # keep-sorted start block=yes newline_separated=yes # Suppress noisy logs and watchdog timeouts. debug = { @@ -78,14 +78,7 @@ }; # Renderer tweaks. - render = { - # keep-sorted start - new_render_scheduling = true; - use_shader_blur_blend = true; - # keep-sorted end - - ctm_animation = 0; - }; + render.ctm_animation = 0; # Keep xwayland windows scaled correctly. xwayland.force_zero_scaling = true; diff --git a/modules/desktop/hyprland/gestures.nix b/modules/desktop/hyprland/gestures.nix --- a/modules/desktop/hyprland/gestures.nix +++ b/modules/desktop/hyprland/gestures.nix @@ -21,12 +21,12 @@ overzicht = getExe config.programs.overzicht.package; # keep-sorted end - cfg = config.programs.nixhypr.touch.enable; + cfg = config.programs.hylix.touch.enable; in { - options.programs.nixhypr.touch.enable = mkEnableOption "Enable touch-specific configuration"; + options.programs.hylix.touch.enable = mkEnableOption "Enable touch-specific configuration"; config = mkIf cfg { - programs.nixhypr = { + programs.hylix = { gestures = [ { direction = "horizontal"; diff --git a/modules/desktop/hyprland/plugins.nix b/modules/desktop/hyprland/plugins.nix --- a/modules/desktop/hyprland/plugins.nix +++ b/modules/desktop/hyprland/plugins.nix @@ -13,10 +13,8 @@ }; flake.modules.homeManager.hyprland = { - # keep-sorted start lib, pkgs, - # keep-sorted end ... }: let inherit (lib) mkOrder; @@ -25,8 +23,8 @@ wayland.windowManager.hyprland.plugins = [pkgs.hyprlandPlugins.hyprfocus]; - programs.nixhypr = { - _generatedConfig = mkOrder 875 '' + programs.hylix = { + _generatedConfig = mkOrder 899 '' -- Expose hyprsplit for keybind dispatchers. hyprsplit = dofile("${pkgs.nur.repos.adam0.hyprsplit}/init.lua") hyprsplit.config({ num_workspaces = 8 }) diff --git a/modules/desktop/hyprland/rules.nix b/modules/desktop/hyprland/rules.nix --- a/modules/desktop/hyprland/rules.nix +++ b/modules/desktop/hyprland/rules.nix @@ -22,48 +22,69 @@ equibop = getExe config.programs.nixcord.equibop.package; grim = getExe pkgs.grim; hyprctl = getExe' osConfig.programs.hyprland.package "hyprctl"; + hyprfocus = "${pkgs.hyprlandPlugins.hyprfocus}/lib/libhyprfocus.so"; hyprpicker = getExe pkgs.hyprpicker; - quickshell = getExe' inputs.noctalia-qs.packages.${pkgs.stdenv.hostPlatform.system}.quickshell ".quickshell-wrapped"; + noctalia-qs = getExe' inputs.noctalia-qs.packages.${pkgs.stdenv.hostPlatform.system}.quickshell ".quickshell-wrapped"; + overzicht = getExe config.programs.overzicht.package; + quickshell = getExe pkgs.quickshell; xdg-desktop-portal-hyprland = getExe' osConfig.programs.hyprland.portalPackage ".xdg-desktop-portal-hyprland-wrapped"; # keep-sorted end in { - programs.nixhypr = { + programs.hylix = { permissions = [ { - allow = "allow"; binary = escapeRegex hyprctl; + mode = "allow"; + type = "plugin"; + } + + { + binary = escapeRegex hyprfocus; + mode = "allow"; type = "plugin"; } # keep-sorted start block=yes newline_separated=yes { - type = "screencopy"; - allow = "allow"; binary = escapeRegex equibop; + mode = "allow"; + type = "screencopy"; } { - type = "screencopy"; - allow = "allow"; binary = escapeRegex grim; + mode = "allow"; + type = "screencopy"; } { - type = "screencopy"; - allow = "allow"; binary = escapeRegex hyprpicker; + mode = "allow"; + type = "screencopy"; } { + binary = escapeRegex noctalia-qs; + mode = "allow"; type = "screencopy"; - allow = "allow"; + } + + { + binary = escapeRegex overzicht; + mode = "allow"; + type = "screencopy"; + } + + { binary = escapeRegex quickshell; + mode = "allow"; + type = "screencopy"; } { - type = "screencopy"; - allow = "allow"; binary = escapeRegex xdg-desktop-portal-hyprland; + mode = "allow"; + type = "screencopy"; } # keep-sorted end ]; diff --git a/modules/desktop/noctalia/general.nix b/modules/desktop/noctalia/general.nix --- a/modules/desktop/noctalia/general.nix +++ b/modules/desktop/noctalia/general.nix @@ -4,7 +4,7 @@ # Use sharp corners (no rounding) for consistent design. radius = 0; - cfgTouch = config.programs.nixhypr.touch.enable or false; + cfgTouch = config.programs.hylix.touch.enable or false; in { # keep-sorted start animationSpeed = 2; diff --git a/modules/desktop/noctalia/plugins.nix b/modules/desktop/noctalia/plugins.nix --- a/modules/desktop/noctalia/plugins.nix +++ b/modules/desktop/noctalia/plugins.nix @@ -22,11 +22,14 @@ inherit (config.xdg) stateHome; cfgBattery = config.programs.noctalia-shell.battery.enable; videosDir = config.xdg.userDirs.videos; + + colors = config.lib.stylix.colors.withHashtag; in { imports = with self.modules; [ # keep-sorted start generic.vars homeManager.sops + homeManager.stylixBase homeManager.xdgDirs # keep-sorted end ]; @@ -84,6 +87,31 @@ }; github-feed = mkOutOfStoreSymlink config.sops.templates."noctalia-github-config".path; + + keybind-cheatsheet = with colors; { + # keep-sorted start + windowWidth = 1600; + hyprlandParserMode = "lua"; + # keep-sorted end + + # keep-sorted start + descriptionTextColor = base00; + keyTextAlt = base00; + keyTextCtrl = base00; + keyTextDefault = base00; + keyTextMouse = base00; + keyTextNumeric = base00; + keyTextPrint = base00; + keyTextShift = base00; + keyTextSuper = base00; + keyTextXF86 = base00; + keyColorMouse = base0E; + keyColorAlt = base08; + keyColorXF86 = base0D; + keyColorPrint = base0D; + keyColorNumeric = base0D; + # keep-sorted end + }; nvim-session-provider.sessionDir = "${stateHome}/nvf/sessions"; diff --git a/modules/hosts/desktop/home.nix b/modules/hosts/desktop/home.nix --- a/modules/hosts/desktop/home.nix +++ b/modules/hosts/desktop/home.nix @@ -20,7 +20,7 @@ programs.btop.gpuBackends = ["rocm"]; # Configure dual monitor setup. - programs.nixhypr.monitors = [ + programs.hylix.monitors = [ { output = "DP-1"; mode = "1920x1080@144"; diff --git a/modules/hosts/laptop/home.nix b/modules/hosts/laptop/home.nix --- a/modules/hosts/laptop/home.nix +++ b/modules/hosts/laptop/home.nix @@ -23,12 +23,12 @@ # keep-sorted end ]; - # keep-sorted start block=yes newline_separated=yes # Enable laptop hardware features. programs.nixcord.equibop.camera.enable = true; + # keep-sorted start block=yes newline_separated=yes # Enable laptop-specific hyprland features. - programs.nixhypr = { + programs.hylix = { # keep-sorted start block=yes newline_separated=yes monitors = [ { diff --git a/modules/hosts/vm/home.nix b/modules/hosts/vm/home.nix --- a/modules/hosts/vm/home.nix +++ b/modules/hosts/vm/home.nix @@ -19,7 +19,7 @@ # keep-sorted start block=yes newline_separated=yes # Configure the vm display settings. - programs.nixhypr.monitors = [ + programs.hylix.monitors = [ { output = "Virtual-1"; mode = "1920x1080@60"; diff --git a/modules/desktop/hyprland/keybinds/applications.nix b/modules/desktop/hyprland/keybinds/applications.nix --- a/modules/desktop/hyprland/keybinds/applications.nix +++ b/modules/desktop/hyprland/keybinds/applications.nix @@ -8,7 +8,7 @@ # keep-sorted end ... }: let - inherit (lib.self) mkNixhyprBindGroup; + inherit (lib.self) mkHylixBindGroup; in { imports = with self.modules.homeManager; [ # keep-sorted start block=yes @@ -34,8 +34,8 @@ app = command: "${runapp} ${command}"; in { - programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Applications" [ + programs.hylix.bindGroups = [ + (mkHylixBindGroup "Applications" [ # keep-sorted start block=yes newline_separated=yes { description = "Browser"; diff --git a/modules/desktop/hyprland/keybinds/brightness.nix b/modules/desktop/hyprland/keybinds/brightness.nix --- a/modules/desktop/hyprland/keybinds/brightness.nix +++ b/modules/desktop/hyprland/keybinds/brightness.nix @@ -14,7 +14,7 @@ optionals # keep-sorted end ; - inherit (lib.self) mkNixhyprBindGroup; + inherit (lib.self) mkHylixBindGroup; cfg = config.hyprland.brightness; @@ -22,8 +22,8 @@ in { options.hyprland.brightness.enable = mkEnableOption "function-row brightness keybindings"; - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Brightness" (optionals cfg.enable [ + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Brightness" (optionals cfg.enable [ # keep-sorted start block=yes newline_separated=yes { description = "Brightness down"; diff --git a/modules/desktop/hyprland/keybinds/default.nix b/modules/desktop/hyprland/keybinds/default.nix --- a/modules/desktop/hyprland/keybinds/default.nix +++ b/modules/desktop/hyprland/keybinds/default.nix @@ -13,6 +13,6 @@ # keep-sorted end ]; - config.programs.nixhypr.settings.binds.movefocus_cycles_fullscreen = true; + config.programs.hylix.settings.binds.movefocus_cycles_fullscreen = true; }; } diff --git a/modules/desktop/hyprland/keybinds/groups.nix b/modules/desktop/hyprland/keybinds/groups.nix --- a/modules/desktop/hyprland/keybinds/groups.nix +++ b/modules/desktop/hyprland/keybinds/groups.nix @@ -6,12 +6,12 @@ # keep-sorted start hyprlandDirections hyprlandGroupNumbers - mkNixhyprBindGroup + mkHylixBindGroup # keep-sorted end ; in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Groups" (concatLists [ + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Groups" (concatLists [ [ # keep-sorted start block=yes newline_separated=yes { diff --git a/modules/desktop/hyprland/keybinds/layout-and-resize.nix b/modules/desktop/hyprland/keybinds/layout-and-resize.nix --- a/modules/desktop/hyprland/keybinds/layout-and-resize.nix +++ b/modules/desktop/hyprland/keybinds/layout-and-resize.nix @@ -5,12 +5,12 @@ (lib.self) # keep-sorted start hyprlandDirections - mkNixhyprBindGroup + mkHylixBindGroup # keep-sorted end ; in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Layout And Resize" (concatLists [ + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Layout And Resize" (concatLists [ (map (direction: { description = "Resize ${direction.label}"; diff --git a/modules/desktop/hyprland/keybinds/media.nix b/modules/desktop/hyprland/keybinds/media.nix --- a/modules/desktop/hyprland/keybinds/media.nix +++ b/modules/desktop/hyprland/keybinds/media.nix @@ -7,12 +7,12 @@ ... }: let inherit (lib) getExe'; - inherit (lib.self) mkNixhyprBindGroup; + inherit (lib.self) mkHylixBindGroup; noctalia = "${getExe' config.programs.noctalia-shell.package "noctalia-shell"} ipc call"; in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Media" [ + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Media" [ # keep-sorted start block=yes newline_separated=yes { description = "Mute"; diff --git a/modules/desktop/hyprland/keybinds/screenshots-and-color.nix b/modules/desktop/hyprland/keybinds/screenshots-and-color.nix --- a/modules/desktop/hyprland/keybinds/screenshots-and-color.nix +++ b/modules/desktop/hyprland/keybinds/screenshots-and-color.nix @@ -9,7 +9,7 @@ ... }: let inherit (lib) getExe; - inherit (lib.self) mkNixhyprBindGroup; + inherit (lib.self) mkHylixBindGroup; # keep-sorted start hyprpicker = getExe pkgs.hyprpicker; @@ -19,8 +19,8 @@ in { imports = [self.modules.homeManager.xdgDirs]; - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Screenshots And Color" [ + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Screenshots And Color" [ # keep-sorted start block=yes newline_separated=yes { description = "Color picker"; diff --git a/modules/desktop/hyprland/keybinds/shell.nix b/modules/desktop/hyprland/keybinds/shell.nix --- a/modules/desktop/hyprland/keybinds/shell.nix +++ b/modules/desktop/hyprland/keybinds/shell.nix @@ -7,12 +7,12 @@ ... }: let inherit (lib) getExe'; - inherit (lib.self) mkNixhyprBindGroup; + inherit (lib.self) mkHylixBindGroup; noctalia = "${getExe' config.programs.noctalia-shell.package "noctalia-shell"} ipc call"; in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Shell" [ + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Shell" [ # keep-sorted start block=yes newline_separated=yes { description = "Clipboard"; diff --git a/modules/desktop/hyprland/keybinds/system.nix b/modules/desktop/hyprland/keybinds/system.nix --- a/modules/desktop/hyprland/keybinds/system.nix +++ b/modules/desktop/hyprland/keybinds/system.nix @@ -13,15 +13,15 @@ getExe' # keep-sorted end ; - inherit (lib.self) mkNixhyprBindGroup; + inherit (lib.self) mkHylixBindGroup; # keep-sorted start noctalia = "${getExe' config.programs.noctalia-shell.package "noctalia-shell"} ipc call"; overzicht = "${getExe config.programs.overzicht.package} ipc call"; # keep-sorted end in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "System" [ + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "System" [ # keep-sorted start block=yes newline_separated=yes { description = "Keybind cheatsheet"; diff --git a/modules/desktop/hyprland/keybinds/window-focus.nix b/modules/desktop/hyprland/keybinds/window-focus.nix --- a/modules/desktop/hyprland/keybinds/window-focus.nix +++ b/modules/desktop/hyprland/keybinds/window-focus.nix @@ -4,12 +4,12 @@ (lib.self) # keep-sorted start hyprlandDirections - mkNixhyprBindGroup + mkHylixBindGroup # keep-sorted end ; in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Window Focus" (map (direction: { + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Window Focus" (map (direction: { description = "Focus ${direction.label}"; keys = ["SUPER" direction.key]; diff --git a/modules/desktop/hyprland/keybinds/window-management.nix b/modules/desktop/hyprland/keybinds/window-management.nix --- a/modules/desktop/hyprland/keybinds/window-management.nix +++ b/modules/desktop/hyprland/keybinds/window-management.nix @@ -1,9 +1,9 @@ { flake.modules.homeManager.hyprland = {lib, ...}: let - inherit (lib.self) mkNixhyprBindGroup; + inherit (lib.self) mkHylixBindGroup; in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Window Management" [ + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Window Management" [ # keep-sorted start block=yes newline_separated=yes { description = "Close window"; diff --git a/modules/desktop/hyprland/keybinds/window-move.nix b/modules/desktop/hyprland/keybinds/window-move.nix --- a/modules/desktop/hyprland/keybinds/window-move.nix +++ b/modules/desktop/hyprland/keybinds/window-move.nix @@ -4,12 +4,12 @@ (lib.self) # keep-sorted start hyprlandDirections - mkNixhyprBindGroup + mkHylixBindGroup # keep-sorted end ; in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Window Move" (map (direction: { + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Window Move" (map (direction: { description = "Move window ${direction.label}"; keys = ["SUPER" "SHIFT" direction.key]; diff --git a/modules/desktop/hyprland/keybinds/workspaces.nix b/modules/desktop/hyprland/keybinds/workspaces.nix --- a/modules/desktop/hyprland/keybinds/workspaces.nix +++ b/modules/desktop/hyprland/keybinds/workspaces.nix @@ -4,12 +4,12 @@ (lib.self) # keep-sorted start hyprlandWorkspaceNumbers - mkNixhyprBindGroup + mkHylixBindGroup # keep-sorted end ; in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Workspaces" (map (workspace: { + config.programs.hylix.bindGroups = [ + (mkHylixBindGroup "Workspaces" (map (workspace: { description = "Workspace ${toString workspace}"; keys = ["SUPER" (toString workspace)]; @@ -17,7 +17,7 @@ }) hyprlandWorkspaceNumbers)) - (mkNixhyprBindGroup "Move To Workspace" (map (workspace: { + (mkHylixBindGroup "Move To Workspace" (map (workspace: { description = "Move to workspace ${toString workspace}"; keys = ["SUPER" "SHIFT" (toString workspace)]; @@ -25,7 +25,7 @@ }) hyprlandWorkspaceNumbers)) - (mkNixhyprBindGroup "Move To Workspace Silent" (map (workspace: { + (mkHylixBindGroup "Move To Workspace Silent" (map (workspace: { description = "Move to workspace ${toString workspace} (silent)"; keys = ["SUPER" "CTRL" (toString workspace)]; diff --git a/modules/programs/tui/opencode/plugins.nix b/modules/programs/tui/opencode/plugins.nix --- a/modules/programs/tui/opencode/plugins.nix +++ b/modules/programs/tui/opencode/plugins.nix @@ -14,7 +14,6 @@ dynamic-context-pruning.enable = true; ignore.enable = true; lazy-mcp.enable = true; - oc-tps.enable = true; unmoji.enable = true; # keep-sorted end diff --git a/modules/programs/tui/television/nix-search.nix b/modules/programs/tui/television/nix-search.nix --- a/modules/programs/tui/television/nix-search.nix +++ b/modules/programs/tui/television/nix-search.nix @@ -107,6 +107,11 @@ sources = { # Home Manager-backed sources. # keep-sorted start block=yes newline_separated=yes + hylix = { + rawDoc = mkHomeManagerDoc inputs.hylix.homeManagerModules.default; + prefixes = ["programs.hylix"]; + }; + nix-flatpak = { rawDoc = mkHomeManagerDoc inputs.nix-flatpak.homeManagerModules.nix-flatpak; prefixes = ["services.flatpak"]; @@ -123,11 +128,6 @@ nixcord = { rawDoc = mkHomeManagerDoc inputs.nixcord.homeModules.nixcord; prefixes = ["programs.nixcord"]; - }; - - nixhypr = { - rawDoc = mkHomeManagerDoc inputs.nixhypr.homeManagerModules.default; - prefixes = ["programs.nixhypr"]; }; noctalia = {