diff --git a/flake.lock b/flake.lock index fb48812..8a596eb 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ }, "catppuccin": { "locked": { - "lastModified": 1732703064, - "narHash": "sha256-n8XOmn0WGtQhAMJKTnhL/3ttV2ZahPRf6gtlqZ6R4QE=", + "lastModified": 1733001911, + "narHash": "sha256-uX/9m0TbdhEzuWA0muM5mI/AaWcLiDLjCCyu5Qr9MRk=", "owner": "catppuccin", "repo": "nix", - "rev": "2e2bdecf0bae287d74947cd5cf967c5c499c23c1", + "rev": "a817009ebfd2cca7f70a77884e5098d0a8c83f8e", "type": "github" }, "original": { @@ -41,11 +41,11 @@ "eza-themes": { "flake": false, "locked": { - "lastModified": 1730050654, - "narHash": "sha256-Gs21+A/to2AqjQsqMlWeOuSowYPOuSZ3fK6LRdBPUmI=", + "lastModified": 1733264582, + "narHash": "sha256-PJ0zSmAiS2iK3bW/HJ7YtYjjLvkgBSAhbbMezjHU0yA=", "owner": "eza-community", "repo": "eza-themes", - "rev": "74be26bbd2ce76b29c37250a2fb7cb5d6644c964", + "rev": "78601bf47075a8b3681f7b4a7fbe5e258ad469f8", "type": "github" }, "original": { @@ -70,6 +70,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -182,11 +203,11 @@ ] }, "locked": { - "lastModified": 1732482255, - "narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=", + "lastModified": 1733754861, + "narHash": "sha256-3JKzIou54yjiMVmvgdJwopekEvZxX3JDT8DpKZs4oXY=", "owner": "nix-community", "repo": "home-manager", - "rev": "a9953635d7f34e7358d5189751110f87e3ac17da", + "rev": "9ebaa80a227eaca9c87c53ed515ade013bc2bca9", "type": "github" }, "original": { @@ -202,11 +223,11 @@ ] }, "locked": { - "lastModified": 1733050161, - "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=", + "lastModified": 1733572789, + "narHash": "sha256-zjO6m5BqxXIyjrnUziAzk4+T4VleqjstNudSqWcpsHI=", "owner": "nix-community", "repo": "home-manager", - "rev": "62d536255879be574ebfe9b87c4ac194febf47c5", + "rev": "c7ffc9727d115e433fd884a62dc164b587ff651d", "type": "github" }, "original": { @@ -224,11 +245,11 @@ ] }, "locked": { - "lastModified": 1732739177, - "narHash": "sha256-iL32+TA/8geCzcL1r3uthrH/GPvbUak5QE++WJUkaiI=", + "lastModified": 1733762021, + "narHash": "sha256-QAc+GvjJXLyp7oy2Vt1LEjYnq6UXPAmncwpL5aZUsUM=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "8d7b2149e618696d5100c2683af1ffa893f02a75", + "rev": "f2180c6fcfca4eaecd79eadba0b5874e9a1c70c1", "type": "github" }, "original": { @@ -240,11 +261,11 @@ "lix": { "flake": false, "locked": { - "lastModified": 1732112222, - "narHash": "sha256-H7GN4++a4vE49SUNojZx+FSk4mmpb2ifJUtJMJHProI=", - "rev": "66f6dbda32959dd5cf3a9aaba15af72d037ab7ff", + "lastModified": 1733740102, + "narHash": "sha256-zIm58tETZ5Z6Scsjrn9rPISLzH4kWb2MIoC/jdii5ts=", + "rev": "369e3f82f066866b4d75abc5fc66e5b8e2149b4c", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/66f6dbda32959dd5cf3a9aaba15af72d037ab7ff.tar.gz?rev=66f6dbda32959dd5cf3a9aaba15af72d037ab7ff" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/369e3f82f066866b4d75abc5fc66e5b8e2149b4c.tar.gz?rev=369e3f82f066866b4d75abc5fc66e5b8e2149b4c" }, "original": { "type": "tarball", @@ -263,11 +284,11 @@ ] }, "locked": { - "lastModified": 1732603698, - "narHash": "sha256-Jw2MhzgCCrKV2MJytehG0cCLIAosBX71p8qmQ6XQlR4=", - "rev": "15b999f9c958c475f71fb8c543b9fc2f36ae8730", + "lastModified": 1733522213, + "narHash": "sha256-H+Pk19MzvI/TAbXWimUPZAoKkD56OSyxJBm8lVIA5n0=", + "rev": "c374ebf5548c7b6d4bf884369a5b6879cfc916ea", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/15b999f9c958c475f71fb8c543b9fc2f36ae8730.tar.gz?rev=15b999f9c958c475f71fb8c543b9fc2f36ae8730" + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/c374ebf5548c7b6d4bf884369a5b6879cfc916ea.tar.gz?rev=c374ebf5548c7b6d4bf884369a5b6879cfc916ea" }, "original": { "type": "tarball", @@ -286,11 +307,11 @@ ] }, "locked": { - "lastModified": 1732603698, - "narHash": "sha256-Jw2MhzgCCrKV2MJytehG0cCLIAosBX71p8qmQ6XQlR4=", - "rev": "15b999f9c958c475f71fb8c543b9fc2f36ae8730", + "lastModified": 1733522213, + "narHash": "sha256-H+Pk19MzvI/TAbXWimUPZAoKkD56OSyxJBm8lVIA5n0=", + "rev": "c374ebf5548c7b6d4bf884369a5b6879cfc916ea", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/15b999f9c958c475f71fb8c543b9fc2f36ae8730.tar.gz?rev=15b999f9c958c475f71fb8c543b9fc2f36ae8730" + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/c374ebf5548c7b6d4bf884369a5b6879cfc916ea.tar.gz?rev=c374ebf5548c7b6d4bf884369a5b6879cfc916ea" }, "original": { "type": "tarball", @@ -299,11 +320,11 @@ }, "nix-flatpak": { "locked": { - "lastModified": 1732304879, - "narHash": "sha256-/DOW8VadE//HA6tuV2++NowYWi7Wa/FmJHXRJoTQnfQ=", + "lastModified": 1733345341, + "narHash": "sha256-8S58zrdpzGhax6tmn1i+R3AA0N9DJMu5FQI8JkA0NNU=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "c84579946c03c996916be0fb6e1340f444c277af", + "rev": "ebb0be49fc381112ff37726c6dd6df4df2ef5a1b", "type": "github" }, "original": { @@ -357,11 +378,11 @@ ] }, "locked": { - "lastModified": 1732519917, - "narHash": "sha256-AGXhwHdJV0q/WNgqwrR2zriubLr785b02FphaBtyt1Q=", + "lastModified": 1733629314, + "narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f4a5ca5771ba9ca31ad24a62c8d511a405303436", + "rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", "type": "github" }, "original": { @@ -377,11 +398,11 @@ ] }, "locked": { - "lastModified": 1732519917, - "narHash": "sha256-AGXhwHdJV0q/WNgqwrR2zriubLr785b02FphaBtyt1Q=", + "lastModified": 1733629314, + "narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f4a5ca5771ba9ca31ad24a62c8d511a405303436", + "rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", "type": "github" }, "original": { @@ -399,11 +420,11 @@ ] }, "locked": { - "lastModified": 1732758830, - "narHash": "sha256-bmMRjp4U3RDvLuwOWXMTHitMBMrmmpzP4x0dckJMZD4=", + "lastModified": 1733709556, + "narHash": "sha256-u0ll0DDrKlO7tiLGGtmphv3wFy5ReDuf0USo/OlfROU=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "09c3d43938e7b535ecada974759e9ed84ee91235", + "rev": "8d11f147df83fe137d3d94f6f3646e3a52bec855", "type": "github" }, "original": { @@ -414,11 +435,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1732483221, - "narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=", + "lastModified": 1733481457, + "narHash": "sha256-IS3bxa4N1VMSh3/P6vhEAHQZecQ3oAlKCDvzCQSO5Is=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405", + "rev": "e563803af3526852b6b1d77107a81908c66a9fcf", "type": "github" }, "original": { @@ -428,13 +449,29 @@ "type": "github" } }, + "nixpkgs": { + "locked": { + "lastModified": 1733581040, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-raw": { "locked": { - "lastModified": 1732981179, - "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=", + "lastModified": 1733550349, + "narHash": "sha256-NcGumB4Lr6KSDq+nIqXtNA8QwAQKDSZT7N9OTGWbTrs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65", + "rev": "e2605d0744c2417b09f8bf850dfca42fcf537d34", "type": "github" }, "original": { @@ -445,11 +482,11 @@ }, "nixpkgs-unstable-raw": { "locked": { - "lastModified": 1732521221, - "narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=", + "lastModified": 1733581040, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d", + "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "type": "github" }, "original": { @@ -459,12 +496,17 @@ } }, "nur": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "treefmt-nix": "treefmt-nix" + }, "locked": { - "lastModified": 1732784817, - "narHash": "sha256-I37vvlS+qk4TMzMouw9kJCilahl8+fOjnCWsBJmPv+U=", + "lastModified": 1733824207, + "narHash": "sha256-qGXcFigGMSFba29CtCnTgf/c9h+Dzh6yHcXTK16jXJ8=", "owner": "nix-community", "repo": "NUR", - "rev": "7c412613e5ed3d49f2e198c0b0187add6b897b3d", + "rev": "f1ea8bb704f71d74dcc885d6bd149b5b661bb858", "type": "github" }, "original": { @@ -483,11 +525,11 @@ ] }, "locked": { - "lastModified": 1732639391, - "narHash": "sha256-kFtXjoCIqx9xe0ZryPXpqS6l/HVg71aNcuL8Y5e8+pI=", + "lastModified": 1733578387, + "narHash": "sha256-XkMZGeqg0GCRoSXvMcaHP7bdvWPRZxCK1sw1ASsc16E=", "owner": "nix-community", "repo": "plasma-manager", - "rev": "06e3209d11797d9c741e25df06ab61048746bf93", + "rev": "2a64e173f1effdcc86e25cba0601e8feedf89115", "type": "github" }, "original": { @@ -595,6 +637,27 @@ "repo": "default", "type": "github" } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 6d54e22..7da03e7 100644 --- a/flake.nix +++ b/flake.nix @@ -99,9 +99,7 @@ name = "patched-nixpkgs-unstable"; src = nixpkgs-unstable-raw; patches = [ - ./nixpkgs-patches/pr359282.patch ./nixpkgs-patches/pr361364.patch - ./nixpkgs-patches/pr355973.patch ]; }; nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { diff --git a/nixpkgs-patches/pr355973.patch b/nixpkgs-patches/pr355973.patch deleted file mode 100644 index 579b9d2..0000000 --- a/nixpkgs-patches/pr355973.patch +++ /dev/null @@ -1,213 +0,0 @@ -From cb9f9a1e5a51a87d59b373db7016cee1608debd5 Mon Sep 17 00:00:00 2001 -From: Atemu -Date: Thu, 14 Nov 2024 20:07:25 +0100 -Subject: [PATCH 1/2] fetchgit{,hub}: add tag argument - -It's become a common pattern to use `rev = "refs/tags/${version}"` rather than -just `rev = version` to ensure that the tag gets fetched rather than a branch -that has the same name. This has so far been done using boilerplate though, so -let's add a simple abstraction to fetch a tag instead. ---- - doc/build-helpers/fetchers.chapter.md | 5 ++++- - pkgs/build-support/fetchgit/default.nix | 5 ++++- - pkgs/build-support/fetchgithub/default.nix | 11 ++++++++--- - 3 files changed, 16 insertions(+), 5 deletions(-) - -diff --git a/doc/build-helpers/fetchers.chapter.md b/doc/build-helpers/fetchers.chapter.md -index d37a2fecaccda..567d47a1499be 100644 ---- a/doc/build-helpers/fetchers.chapter.md -+++ b/doc/build-helpers/fetchers.chapter.md -@@ -755,6 +755,9 @@ Used with Subversion. Expects `url` to a Subversion directory, `rev`, and `hash` - - Used with Git. Expects `url` to a Git repo, `rev`, and `hash`. `rev` in this case can be full the git commit id (SHA1 hash) or a tag name like `refs/tags/v1.0`. - -+If you want to fetch a tag you should pass the `tag` parameter instead of `rev` which has the same effect as setting `rev = "refs/tags"/${version}"`. -+This is safer than just setting `rev = version` w.r.t. possible branch and tag name conflicts. -+ - Additionally, the following optional arguments can be given: - - *`fetchSubmodules`* (Boolean) -@@ -833,7 +836,7 @@ A number of fetcher functions wrap part of `fetchurl` and `fetchzip`. They are m - - ## `fetchFromGitHub` {#fetchfromgithub} - --`fetchFromGitHub` expects four arguments. `owner` is a string corresponding to the GitHub user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `hash` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available, but `hash` is currently preferred. -+`fetchFromGitHub` expects four arguments. `owner` is a string corresponding to the GitHub user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. If you need to fetch a tag however, you should prefer to use the `tag` parameter which achieves this in a safer way with less boilerplate. Finally, `hash` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available, but `hash` is currently preferred. - - To use a different GitHub instance, use `githubBase` (defaults to `"github.com"`). - -diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix -index 4c40cbcef7e16..6f4cbba982a0e 100644 ---- a/pkgs/build-support/fetchgit/default.nix -+++ b/pkgs/build-support/fetchgit/default.nix -@@ -13,7 +13,10 @@ in - lib.makeOverridable (lib.fetchers.withNormalizedHash { } ( - # NOTE Please document parameter additions or changes in - # doc/build-helpers/fetchers.chapter.md --{ url, rev ? "HEAD", leaveDotGit ? deepClone -+{ url -+, tag ? null -+, rev ? if tag != null then "refs/tags/${tag}" else "HEAD" # FIXME fetching HEAD by default is problematic at best -+, leaveDotGit ? deepClone - , outputHash ? lib.fakeHash, outputHashAlgo ? null - , fetchSubmodules ? true, deepClone ? false - , branchName ? null -diff --git a/pkgs/build-support/fetchgithub/default.nix b/pkgs/build-support/fetchgithub/default.nix -index d27a3df7d3df7..de9912465a937 100644 ---- a/pkgs/build-support/fetchgithub/default.nix -+++ b/pkgs/build-support/fetchgithub/default.nix -@@ -1,7 +1,10 @@ - { lib, fetchgit, fetchzip }: - - lib.makeOverridable ( --{ owner, repo, rev, name ? "source" -+{ owner, repo -+, tag ? null -+, rev ? if tag != null then "refs/tags/${tag}" else null -+, name ? "source" - , fetchSubmodules ? false, leaveDotGit ? null - , deepClone ? false, private ? false, forceFetchGit ? false - , fetchLFS ? false -@@ -11,6 +14,8 @@ lib.makeOverridable ( - , ... # For hash agility - }@args: - -+assert (lib.assertMsg (rev != null) "You must provide `fetchFromGitHub with a `rev` or `tag`."); -+ - let - - position = (if args.meta.description or null != null -@@ -24,7 +29,7 @@ let - # to indicate where derivation originates, similar to make-derivation.nix's mkDerivation - position = "${position.file}:${toString position.line}"; - }; -- passthruAttrs = removeAttrs args [ "owner" "repo" "rev" "fetchSubmodules" "forceFetchGit" "private" "githubBase" "varPrefix" ]; -+ passthruAttrs = removeAttrs args [ "owner" "repo" "tag" "rev" "fetchSubmodules" "forceFetchGit" "private" "githubBase" "varPrefix" ]; - varBase = "NIX${lib.optionalString (varPrefix != null) "_${varPrefix}"}_GITHUB_PRIVATE_"; - useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || fetchLFS || (sparseCheckout != []); - # We prefer fetchzip in cases we don't need submodules as the hash -@@ -53,7 +58,7 @@ let - - fetcherArgs = (if useFetchGit - then { -- inherit rev deepClone fetchSubmodules sparseCheckout fetchLFS; url = gitRepoUrl; -+ inherit tag rev deepClone fetchSubmodules sparseCheckout fetchLFS; url = gitRepoUrl; - } // lib.optionalAttrs (leaveDotGit != null) { inherit leaveDotGit; } - else { - url = "${baseUrl}/archive/${rev}.tar.gz"; - -From e9a31f51468e43aaf8df79d10dca5a3d6447877b Mon Sep 17 00:00:00 2001 -From: Atemu -Date: Wed, 4 Dec 2024 01:37:01 +0100 -Subject: [PATCH 2/2] fetchgit{,hub}: assert illegal tag + rev combinations - -It's quite a bit more complex due to this but this was asked for during review ---- - pkgs/build-support/fetchgit/default.nix | 27 ++++++++++++++++++---- - pkgs/build-support/fetchgithub/default.nix | 11 +++++---- - 2 files changed, 30 insertions(+), 8 deletions(-) - -diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix -index 6f4cbba982a0e..f2b4726fef09d 100644 ---- a/pkgs/build-support/fetchgit/default.nix -+++ b/pkgs/build-support/fetchgit/default.nix -@@ -15,14 +15,14 @@ lib.makeOverridable (lib.fetchers.withNormalizedHash { } ( - # doc/build-helpers/fetchers.chapter.md - { url - , tag ? null --, rev ? if tag != null then "refs/tags/${tag}" else "HEAD" # FIXME fetching HEAD by default is problematic at best -+, rev ? null - , leaveDotGit ? deepClone - , outputHash ? lib.fakeHash, outputHashAlgo ? null - , fetchSubmodules ? true, deepClone ? false - , branchName ? null - , sparseCheckout ? [] - , nonConeMode ? false --, name ? urlToName url rev -+, name ? null - , # Shell code executed after the file has been fetched - # successfully. This can do things like check or transform the file. - postFetch ? "" -@@ -62,12 +62,30 @@ lib.makeOverridable (lib.fetchers.withNormalizedHash { } ( - assert deepClone -> leaveDotGit; - assert nonConeMode -> (sparseCheckout != []); - -+let -+ revWithTag = -+ let -+ warningMsg = "fetchgit requires one of either `rev` or `tag` to be provided (not both)."; -+ otherIsNull = other: lib.assertMsg (other == null) warningMsg; -+ in -+ if tag != null then -+ assert (otherIsNull rev); -+ "refs/tags/${tag}" -+ else if rev != null then -+ assert (otherIsNull tag); -+ rev -+ else -+ # FIXME fetching HEAD if no rev or tag is provided is problematic at best -+ "HEAD"; -+in -+ - if builtins.isString sparseCheckout then - # Changed to throw on 2023-06-04 - throw "Please provide directories/patterns for sparse checkout as a list of strings. Passing a (multi-line) string is not supported any more." - else - stdenvNoCC.mkDerivation { -- inherit name; -+ name = if name != null then name else urlToName url revWithTag; -+ - builder = ./builder.sh; - fetcher = ./nix-prefetch-git; - -@@ -82,7 +100,8 @@ stdenvNoCC.mkDerivation { - # > from standard in as a newline-delimited list instead of from the arguments. - sparseCheckout = builtins.concatStringsSep "\n" sparseCheckout; - -- inherit url rev leaveDotGit fetchLFS fetchSubmodules deepClone branchName nonConeMode postFetch; -+ inherit url leaveDotGit fetchLFS fetchSubmodules deepClone branchName nonConeMode postFetch; -+ rev = revWithTag; - - postHook = if netrcPhase == null then null else '' - ${netrcPhase} -diff --git a/pkgs/build-support/fetchgithub/default.nix b/pkgs/build-support/fetchgithub/default.nix -index de9912465a937..f80e012955336 100644 ---- a/pkgs/build-support/fetchgithub/default.nix -+++ b/pkgs/build-support/fetchgithub/default.nix -@@ -3,7 +3,7 @@ - lib.makeOverridable ( - { owner, repo - , tag ? null --, rev ? if tag != null then "refs/tags/${tag}" else null -+, rev ? null - , name ? "source" - , fetchSubmodules ? false, leaveDotGit ? null - , deepClone ? false, private ? false, forceFetchGit ? false -@@ -14,13 +14,16 @@ lib.makeOverridable ( - , ... # For hash agility - }@args: - --assert (lib.assertMsg (rev != null) "You must provide `fetchFromGitHub with a `rev` or `tag`."); -+assert (lib.assertMsg (lib.xor (tag == null) (rev == null)) "fetchFromGitHub requires one of either `rev` or `tag` to be provided (not both)."); - - let - - position = (if args.meta.description or null != null - then builtins.unsafeGetAttrPos "description" args.meta -- else builtins.unsafeGetAttrPos "rev" args -+ else if tag != null then -+ builtins.unsafeGetAttrPos "tag" args -+ else -+ builtins.unsafeGetAttrPos "rev" args - ); - baseUrl = "https://${githubBase}/${owner}/${repo}"; - newMeta = meta // { -@@ -61,7 +64,7 @@ let - inherit tag rev deepClone fetchSubmodules sparseCheckout fetchLFS; url = gitRepoUrl; - } // lib.optionalAttrs (leaveDotGit != null) { inherit leaveDotGit; } - else { -- url = "${baseUrl}/archive/${rev}.tar.gz"; -+ url = "${baseUrl}/archive/${if tag != null then "refs/tags/${tag}" else rev}.tar.gz"; - - passthru = { - inherit gitRepoUrl; diff --git a/nixpkgs-patches/pr359282.patch b/nixpkgs-patches/pr359282.patch deleted file mode 100644 index df16636..0000000 --- a/nixpkgs-patches/pr359282.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 40b3e9f1d39626c1bf38a315e78a1aafd3f378d4 Mon Sep 17 00:00:00 2001 -From: Toast <39011842+toast003@users.noreply.github.com> -Date: Tue, 26 Nov 2024 13:36:45 +0100 -Subject: [PATCH 1/2] handheld-daemon: 3.4.1 -> 3.5.7 - -Also install hhd's hwdb file, since it is needed for buttons to work -properly on the MSI Claw, among other things ---- - pkgs/by-name/ha/handheld-daemon/package.nix | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix -index 286566a2710a4..e21fe848b0942 100644 ---- a/pkgs/by-name/ha/handheld-daemon/package.nix -+++ b/pkgs/by-name/ha/handheld-daemon/package.nix -@@ -8,14 +8,14 @@ - }: - python3.pkgs.buildPythonApplication rec { - pname = "handheld-daemon"; -- version = "3.4.1"; -+ version = "3.5.7"; - pyproject = true; - - src = fetchFromGitHub { - owner = "hhd-dev"; - repo = "hhd"; - rev = "refs/tags/v${version}"; -- hash = "sha256-hup9G4pTlTl68zLzhaDmH7nV8fp/I94Nuis68B8K2wY="; -+ hash = "sha256-nUHEPyTHU7LD6BZg+2cLl4M/ZPb5MQl6xxtJW1iZkEY="; - }; - - propagatedBuildInputs = with python3.pkgs; [ -@@ -27,6 +27,7 @@ python3.pkgs.buildPythonApplication rec { - setuptools - toybox - xlib -+ pyserial - ]; - - # This package doesn't have upstream tests. -@@ -46,6 +47,7 @@ python3.pkgs.buildPythonApplication rec { - - postInstall = '' - install -Dm644 $src/usr/lib/udev/rules.d/83-hhd.rules -t $out/lib/udev/rules.d/ -+ install -Dm644 $src/usr/lib/udev/hwdb.d/83-hhd.hwdb -t $out/lib/udev/hwdb.d/ - ''; - - meta = with lib; { - -From efc1301777818548a2f23f31248486e680502456 Mon Sep 17 00:00:00 2001 -From: Toast <39011842+toast003@users.noreply.github.com> -Date: Tue, 26 Nov 2024 17:50:06 +0100 -Subject: [PATCH 2/2] handheld-daemon: 3.5.7 -> 3.6.1 - -Version 3.6.0 added lsof as a dependency ---- - pkgs/by-name/ha/handheld-daemon/package.nix | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix -index e21fe848b0942..b99cd1c581476 100644 ---- a/pkgs/by-name/ha/handheld-daemon/package.nix -+++ b/pkgs/by-name/ha/handheld-daemon/package.nix -@@ -5,17 +5,18 @@ - lib, - python3, - toybox, -+ lsof - }: - python3.pkgs.buildPythonApplication rec { - pname = "handheld-daemon"; -- version = "3.5.7"; -+ version = "3.6.1"; - pyproject = true; - - src = fetchFromGitHub { - owner = "hhd-dev"; - repo = "hhd"; - rev = "refs/tags/v${version}"; -- hash = "sha256-nUHEPyTHU7LD6BZg+2cLl4M/ZPb5MQl6xxtJW1iZkEY="; -+ hash = "sha256-IdpSRb66G+WzTv/BC29r2OjO1b4VdWbV6OSzOoiFAO0="; - }; - - propagatedBuildInputs = with python3.pkgs; [ -@@ -28,6 +29,7 @@ python3.pkgs.buildPythonApplication rec { - toybox - xlib - pyserial -+ lsof - ]; - - # This package doesn't have upstream tests. diff --git a/roles/common/configuration.nix b/roles/common/configuration.nix index af07bef..7024b74 100755 --- a/roles/common/configuration.nix +++ b/roles/common/configuration.nix @@ -5,7 +5,7 @@ flakeSelf, ... }: { - imports = [flakeSelf.inputs.nur.nixosModules.nur]; + imports = [flakeSelf.inputs.nur.modules.nixos.default]; environment = { # As of the 1st of May 2023, the default packages are nano, perl, rsync and strace # I don't need any of them, so I just empty the list diff --git a/roles/desktop/configuration.nix b/roles/desktop/configuration.nix index 5129810..4348234 100644 --- a/roles/desktop/configuration.nix +++ b/roles/desktop/configuration.nix @@ -14,8 +14,9 @@ }; # Set up fonts - fonts.packages = [ - (pkgs.nerdfonts.override {fonts = ["Hack" "JetBrainsMono"];}) + fonts.packages = with pkgs.nerd-fonts; [ + hack + jetbrains-mono ]; hardware.keyboard.qmk.enable = true; diff --git a/roles/gaming/programs/retroarch.nix b/roles/gaming/programs/retroarch.nix index 3088ab2..ffa46a3 100644 --- a/roles/gaming/programs/retroarch.nix +++ b/roles/gaming/programs/retroarch.nix @@ -21,7 +21,7 @@ in { home = { packages = [ ( - pkgs.retroarch.override { + pkgs.wrapRetroArch { cores = with pkgs.libretro; [ snes9x ]; diff --git a/roles/gaming/programs/rpcs3.nix b/roles/gaming/programs/rpcs3.nix index ef1be51..b8c48c0 100644 --- a/roles/gaming/programs/rpcs3.nix +++ b/roles/gaming/programs/rpcs3.nix @@ -1,5 +1,5 @@ -{config, ...}: { - environment.systemPackages = with config; [ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ nur.repos.ataraxiasjel.rpcs3 ]; # Compiling RPCS3 takes quite a while diff --git a/roles/kde/patches/kwin-pr6406.patch b/roles/kde/patches/kwin-pr6406.patch index b58678b..e3a55a8 100644 --- a/roles/kde/patches/kwin-pr6406.patch +++ b/roles/kde/patches/kwin-pr6406.patch @@ -1,4 +1,4 @@ -From ffa4f312c750ae0e7e36a656612148b1fa9c020c Mon Sep 17 00:00:00 2001 +From 3ea8c3758e75f06c71b0b279c4e51f22ec554954 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 4 Oct 2024 22:49:16 +0300 Subject: [PATCH 1/9] Resize X11 window immediately if it doesn't support @@ -181,10 +181,10 @@ index b71a9d3640..780ccfbc7e 100644 } -- -2.46.1 +2.47.0 -From bc87fc3d80ad525786a9b15df5c2488a6110b53d Mon Sep 17 00:00:00 2001 +From 1be3dfa4b40732997ecb1bd1959ba775331d603a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 4 Oct 2024 22:55:44 +0300 Subject: [PATCH 2/9] Rename X11Window::handleSync,handleSyncTimeout @@ -255,10 +255,10 @@ index 4f3b43c8b0..b54db23345 100644 bool allowWindowActivation(xcb_timestamp_t time = -1U, bool focus_in = false); -- -2.46.1 +2.47.0 -From b8016cbe28d847d052f1b0ee6c66bdaabbb88368 Mon Sep 17 00:00:00 2001 +From ea53098c38b64cb5870ef4f3b47fb53f509e03a4 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 4 Oct 2024 22:59:34 +0300 Subject: [PATCH 3/9] Rename X11Window::SyncRequest::isPending @@ -340,10 +340,10 @@ index b54db23345..10fa57eaf2 100644 }; const SyncRequest &syncRequest() const -- -2.46.1 +2.47.0 -From 61e7061998ce3244325af62aac198ecf058a1aeb Mon Sep 17 00:00:00 2001 +From 49319a3f3e2a1d468e12bdf3dfd7eeb2e3db0899 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 4 Oct 2024 23:12:44 +0300 Subject: [PATCH 4/9] Make XSync timeout more permissive @@ -599,10 +599,10 @@ index 10fa57eaf2..6b430b861a 100644 void establishCommandAllGrab(uint8_t button); -- -2.46.1 +2.47.0 -From dd10d1b329b06ab3377f669a610fec9726f28a70 Mon Sep 17 00:00:00 2001 +From 79e1853e9ecd20c1d9549399b46d434475b753bd Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 4 Oct 2024 23:20:03 +0300 Subject: [PATCH 5/9] Disable Xwayland surface commits for all sync requests @@ -658,10 +658,10 @@ index 1d25ab82b1..5688ea6da8 100644 configure(nativeFrameGeometry, nativeWrapperGeometry, nativeClientGeometry); } -- -2.46.1 +2.47.0 -From 60ef3223e42a06110693fef3ec493662c799af38 Mon Sep 17 00:00:00 2001 +From 038a798c8be170eb5b7132b823d77474d118ca42 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 4 Oct 2024 23:40:41 +0300 Subject: [PATCH 6/9] Make Xwayland resizing less glitchy @@ -824,10 +824,10 @@ index 6b430b861a..73d4c23a4c 100644 void setAllowCommits(bool allow); -- -2.46.1 +2.47.0 -From 59f45806953e05bbf289480b9e5882e4d87ee434 Mon Sep 17 00:00:00 2001 +From 10c5298221f5dc3cc90255846580b608f6f3c18c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 3 Oct 2024 00:43:57 +0300 Subject: [PATCH 7/9] scene: Use standard wl_surface item for Xwayland surfaces @@ -837,13 +837,13 @@ opaque region getting out of sync. Xwayland MR: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1698 --- - src/scene/surfaceitem_wayland.cpp | 21 --------------------- - src/scene/surfaceitem_wayland.h | 19 ------------------- + src/scene/surfaceitem_wayland.cpp | 36 ------------------------------- + src/scene/surfaceitem_wayland.h | 20 ----------------- src/scene/windowitem.cpp | 2 +- - 3 files changed, 1 insertion(+), 41 deletions(-) + 3 files changed, 1 insertion(+), 57 deletions(-) diff --git a/src/scene/surfaceitem_wayland.cpp b/src/scene/surfaceitem_wayland.cpp -index a4d012f774..04961952b9 100644 +index 4a307565c0..04961952b9 100644 --- a/src/scene/surfaceitem_wayland.cpp +++ b/src/scene/surfaceitem_wayland.cpp @@ -12,11 +12,6 @@ @@ -858,7 +858,7 @@ index a4d012f774..04961952b9 100644 namespace KWin { -@@ -247,22 +242,6 @@ bool SurfacePixmapWayland::isValid() const +@@ -247,37 +242,6 @@ bool SurfacePixmapWayland::isValid() const return m_bufferRef; } @@ -867,22 +867,37 @@ index a4d012f774..04961952b9 100644 - : SurfaceItemWayland(window->surface(), parent) - , m_window(window) -{ +- connect(window, &X11Window::shapeChanged, this, &SurfaceItemXwayland::discardQuads); +-} +- +-QList SurfaceItemXwayland::shape() const +-{ +- QList shape = m_window->shapeRegion(); +- for (QRectF &shapePart : shape) { +- shapePart = shapePart.intersected(rect()); +- } +- return shape; -} - -QRegion SurfaceItemXwayland::opaque() const -{ -- if (!m_window->hasAlpha()) { -- return rect().toRect(); -- } else { -- return m_window->opaqueRegion() & rect().toRect(); +- QRegion shapeRegion; +- for (const QRectF &shapePart : shape()) { +- shapeRegion += shapePart.toRect(); - } +- if (!m_window->hasAlpha()) { +- return shapeRegion; +- } else { +- return m_window->opaqueRegion() & shapeRegion; +- } +- return QRegion(); -} -#endif } // namespace KWin #include "moc_surfaceitem_wayland.cpp" diff --git a/src/scene/surfaceitem_wayland.h b/src/scene/surfaceitem_wayland.h -index 991cd168c3..fbc7498446 100644 +index f769284172..fbc7498446 100644 --- a/src/scene/surfaceitem_wayland.h +++ b/src/scene/surfaceitem_wayland.h @@ -16,7 +16,6 @@ namespace KWin @@ -893,7 +908,7 @@ index 991cd168c3..fbc7498446 100644 /** * The SurfaceItemWayland class represents a Wayland surface in the scene. -@@ -83,22 +82,4 @@ private: +@@ -83,23 +82,4 @@ private: SurfaceItemWayland *m_item; }; @@ -909,6 +924,7 @@ index 991cd168c3..fbc7498446 100644 - explicit SurfaceItemXwayland(X11Window *window, Item *parent = nullptr); - - QRegion opaque() const override; +- QList shape() const override; - -private: - X11Window *m_window; @@ -930,10 +946,10 @@ index 4283051e7e..913d2708f5 100644 break; case Application::OperationModeWaylandOnly: -- -2.46.1 +2.47.0 -From 84f35749d9084692e0ea8ae4ea187178005457cc Mon Sep 17 00:00:00 2001 +From 91ca5127fbf590a383fe311b76da8dce553e2a8a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 14 Oct 2024 00:34:28 +0300 Subject: [PATCH 8/9] Send the initial sync request before mapping the frame @@ -995,10 +1011,10 @@ index b22de557d8..be35fe07fd 100644 bool allow; if (session) { -- -2.46.1 +2.47.0 -From 3ecac02f2f7573d7b2714c1fb23bebaec8afa0e0 Mon Sep 17 00:00:00 2001 +From cffaa20e83b7d9de69dcc835f6ab5d2609a49be5 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 17 Oct 2024 19:21:32 +0300 Subject: [PATCH 9/9] Block interactive resizing if there is a pending XSync @@ -1025,5 +1041,5 @@ index be35fe07fd..3e989f29bd 100644 void X11Window::doInteractiveResizeSync(const QRectF &rect) -- -2.46.1 +2.47.0