diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-05-28 14:20:39 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-05-28 14:20:39 +0200 |
| commit | e1e1dfcaedbd9c6920fb111a81edb196fa6049fb (patch) | |
| tree | 4fdda766729c893b2f0be7cde38e0546993784e7 | |
| parent | treewide: Format (diff) | |
| download | nixos-config-e1e1dfcaedbd9c6920fb111a81edb196fa6049fb.zip | |
treewide: Use unflake to de-duplicate flake inputs
Otherwise, we still have a lot of `nixpkgs` in the closure (they are just not visible with npins).
| -rw-r--r-- | inputs.nix | 53 | ||||
| -rw-r--r-- | npins/full.nix | 12 | ||||
| -rw-r--r-- | npins/sources.json | 350 | ||||
| -rw-r--r-- | scripts/npins_to_unflake.jq | 34 | ||||
| -rwxr-xr-x | scripts/unflake.sh | 6 | ||||
| -rw-r--r-- | unflake.nix | 187 | ||||
| -rwxr-xr-x | update.sh | 1 |
7 files changed, 559 insertions, 84 deletions
diff --git a/inputs.nix b/inputs.nix new file mode 100644 index 00000000..f30e43dd --- /dev/null +++ b/inputs.nix @@ -0,0 +1,53 @@ +let + nixpkgsVersion = "26.05"; + lanzabooteVersion = "v1.0.0"; +in { + "agenix" = { + url = "github:ryantm/agenix/main"; + }; + "disko" = { + url = "github:nix-community/disko/master"; + }; + "flake-compat" = { + url = "git+https://git.lix.systems/lix-project/flake-compat?ref=main"; + }; + "home-manager" = { + url = "github:nix-community/home-manager/master"; + }; + "impermanence" = { + url = "github:nix-community/impermanence/master"; + }; + "lanzaboote" = { + url = "github:nix-community/lanzaboote/${lanzabooteVersion}"; + }; + "library" = { + url = "git+https://git.foss-syndicate.org/vhack.eu/nix-library?ref=prime"; + }; + "nix-index-database" = { + url = "github:nix-community/nix-index-database/main"; + }; + "nixos-generators" = { + url = "github:nix-community/nixos-generators/master"; + }; + "nixpkgs-stable" = { + url = "github:NixOS/nixpkgs/nixos-${nixpkgsVersion}"; + }; + "nixpkgs" = { + url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + "nixvim" = { + url = "github:nix-community/nixvim/main"; + }; + "qmk_layout" = { + url = "git+https://git.foss-syndicate.org/bpeetz/qmk_layout?ref=prime"; + }; + # "serverphone" = { + # url = "git+https://codeberg.org/vhack.eu/serverphone?ref=prime"; + # }; + "templates" = { + url = "git+https://codeberg.org/bpeetz/flake-templates?ref=prime"; + }; + "treefmt-nix" = { + url = "github:numtide/treefmt-nix/main"; + }; +} diff --git a/npins/full.nix b/npins/full.nix index 71540c0f..547b32cf 100644 --- a/npins/full.nix +++ b/npins/full.nix @@ -1,8 +1,10 @@ _: let - sources = import ./default.nix {}; -in { - inherit sources; + sources = import ../unflake.nix; + load = input: sources."${input}"; + loadFlake = load; - loadFlake = flakeInput: (import sources.flake-compat {src = sources."${flakeInput}";}).outputs; - load = input: import sources."${input}" {}; + # loadFlake = flakeInput: (import sources.flake-compat {src = sources."${flakeInput}";}).outputs; + # load = input: import sources."${input}" {}; +in { + inherit sources load loadFlake; } diff --git a/npins/sources.json b/npins/sources.json index 224906d9..8ae3b225 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1,32 +1,44 @@ { "pins": { - "agenix": { + "unflake_git_https---codeberg-org-bpeetz-flake-templates_ref_prime": { "type": "Git", "repository": { - "type": "GitHub", - "owner": "ryantm", - "repo": "agenix" + "type": "Forgejo", + "server": "https://codeberg.org/", + "owner": "bpeetz", + "repo": "flake-templates" }, - "branch": "main", + "branch": "prime", "submodules": false, - "revision": "b027ee29d959fda4b60b57566d64c98a202e0feb", - "url": "https://github.com/ryantm/agenix/archive/b027ee29d959fda4b60b57566d64c98a202e0feb.tar.gz", - "hash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=" + "revision": "0294fb03df7c265f8fae24a9e775d69a953bbf03", + "url": "https://codeberg.org/bpeetz/flake-templates/archive/0294fb03df7c265f8fae24a9e775d69a953bbf03.tar.gz", + "hash": "sha256-rI1qMFzbXVjfEvmf2OS4upnibXpL21its6cCXqhz86o=" }, - "disko": { + "unflake_git_https---git-foss-syndicate-org-bpeetz-qmk_layout_ref_prime": { "type": "Git", "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "disko" + "type": "Git", + "url": "https://git.foss-syndicate.org/bpeetz/qmk_layout" }, - "branch": "master", + "branch": "prime", "submodules": false, - "revision": "63b4e7e6cf75307c1d26ac3762b886b5b0247267", - "url": "https://github.com/nix-community/disko/archive/63b4e7e6cf75307c1d26ac3762b886b5b0247267.tar.gz", - "hash": "sha256-8GzXDOXckDWwST8TY5DbwYFjdvQLlP7K9CLSVx6iTTo=" + "revision": "4dff2e6ba5c9c80de3e3d2213ad28802814c3bba", + "url": null, + "hash": "sha256-dv5P3ahDICDacdzEmcyxrtKgbRWhVFiKQaLEz+WniGM=" }, - "flake-compat": { + "unflake_git_https---git-foss-syndicate-org-vhack-eu-nix-library_ref_prime": { + "type": "Git", + "repository": { + "type": "Git", + "url": "https://git.foss-syndicate.org/vhack.eu/nix-library" + }, + "branch": "prime", + "submodules": false, + "revision": "65bf71bb6ef05ce684924a1dc248bb2e8e2869fb", + "url": null, + "hash": "sha256-IV7n/l3rFoz5UuavrDv0a7IIOPne0jDQVmJAR8bve8U=" + }, + "unflake_git_https---git-lix-systems-lix-project-flake-compat_ref_main": { "type": "Git", "repository": { "type": "Forgejo", @@ -40,7 +52,85 @@ "url": "https://git.lix.systems/lix-project/flake-compat/archive/382052b74656a369c5408822af3f2501e9b1af81.tar.gz", "hash": "sha256-Eg9b/rq/ECYwNwEXs5i9wHyhxNI0JrYx2srdI2uZMaQ=" }, - "home-manager": { + "unflake_github_cachix_pre-commit-hooks-nix": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "cachix", + "repo": "pre-commit-hooks.nix" + }, + "branch": "master", + "submodules": false, + "revision": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", + "url": "https://github.com/cachix/pre-commit-hooks.nix/archive/61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a.tar.gz", + "hash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=" + }, + "unflake_github_hercules-ci_flake-parts": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "hercules-ci", + "repo": "flake-parts" + }, + "branch": "main", + "submodules": false, + "revision": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", + "url": "https://github.com/hercules-ci/flake-parts/archive/f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb.tar.gz", + "hash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=" + }, + "unflake_github_hercules-ci_gitignore-nix": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "hercules-ci", + "repo": "gitignore.nix" + }, + "branch": "master", + "submodules": false, + "revision": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c", + "url": "https://github.com/hercules-ci/gitignore.nix/archive/cb5e3fdca1de58ccbc3ef53de65bd372b48f567c.tar.gz", + "hash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=" + }, + "unflake_github_ipetkov_crane": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ipetkov", + "repo": "crane" + }, + "branch": "master", + "submodules": false, + "revision": "edb38893982a3338972bb4a2ec7ce7c29ba10fd9", + "url": "https://github.com/ipetkov/crane/archive/edb38893982a3338972bb4a2ec7ce7c29ba10fd9.tar.gz", + "hash": "sha256-BLrtr42azquO7MdGFU5a7KiMl3YpFlTeIXqy1fT5GlQ=" + }, + "unflake_github_lnl7_nix-darwin_ref_master": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "lnl7", + "repo": "nix-darwin" + }, + "branch": "master", + "submodules": false, + "revision": "56c666e108467d87d13508936aade6d567f2a501", + "url": "https://github.com/lnl7/nix-darwin/archive/56c666e108467d87d13508936aade6d567f2a501.tar.gz", + "hash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=" + }, + "unflake_github_nix-community_disko_ref_master": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nix-community", + "repo": "disko" + }, + "branch": "master", + "submodules": false, + "revision": "36c1d04e85fc70f7b94f7434b1ea0a1a13bda4cd", + "url": "https://github.com/nix-community/disko/archive/36c1d04e85fc70f7b94f7434b1ea0a1a13bda4cd.tar.gz", + "hash": "sha256-81sATQ+hMCcsqFCN5UyhCoXXf62yQfKtzKzuiFXtdxA=" + }, + "unflake_github_nix-community_home-manager": { "type": "Git", "repository": { "type": "GitHub", @@ -49,11 +139,24 @@ }, "branch": "master", "submodules": false, - "revision": "e4419d3123b780d5f4c0bceeace450424387638c", - "url": "https://github.com/nix-community/home-manager/archive/e4419d3123b780d5f4c0bceeace450424387638c.tar.gz", - "hash": "sha256-dGM+QCstz/DyLB68+JK5GWyMx4QSqmOJEVgZmy63d/g=" + "revision": "61e2c9659324181e0f0ed911958c536333b1d4f6", + "url": "https://github.com/nix-community/home-manager/archive/61e2c9659324181e0f0ed911958c536333b1d4f6.tar.gz", + "hash": "sha256-HwIJ3tOcwSMiV75L7KqJXciXR9UfT+d7rwOZMX7cTnA=" }, - "impermanence": { + "unflake_github_nix-community_home-manager_ref_master": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nix-community", + "repo": "home-manager" + }, + "branch": "master", + "submodules": false, + "revision": "61e2c9659324181e0f0ed911958c536333b1d4f6", + "url": "https://github.com/nix-community/home-manager/archive/61e2c9659324181e0f0ed911958c536333b1d4f6.tar.gz", + "hash": "sha256-HwIJ3tOcwSMiV75L7KqJXciXR9UfT+d7rwOZMX7cTnA=" + }, + "unflake_github_nix-community_impermanence_ref_master": { "type": "Git", "repository": { "type": "GitHub", @@ -66,7 +169,7 @@ "url": "https://github.com/nix-community/impermanence/archive/7b1d382faf603b6d264f58627330f9faa5cba149.tar.gz", "hash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=" }, - "lanzaboote": { + "unflake_github_nix-community_lanzaboote_ref_v1-0-0": { "type": "GitRelease", "repository": { "type": "GitHub", @@ -82,19 +185,7 @@ "url": "https://api.github.com/repos/nix-community/lanzaboote/tarball/refs/tags/v1.0.0", "hash": "sha256-RJmgVDzjRI18BWVogG6wpsl1UCuV6ui8qr4DJ1LfWZ8=" }, - "library": { - "type": "Git", - "repository": { - "type": "Git", - "url": "https://git.foss-syndicate.org/vhack.eu/nix-library" - }, - "branch": "prime", - "submodules": false, - "revision": "65bf71bb6ef05ce684924a1dc248bb2e8e2869fb", - "url": null, - "hash": "sha256-IV7n/l3rFoz5UuavrDv0a7IIOPne0jDQVmJAR8bve8U=" - }, - "nix-index-database": { + "unflake_github_nix-community_nix-index-database_ref_main": { "type": "Git", "repository": { "type": "GitHub", @@ -103,11 +194,11 @@ }, "branch": "main", "submodules": false, - "revision": "2dea2b920e7127b3afa8506713f23536651de312", - "url": "https://github.com/nix-community/nix-index-database/archive/2dea2b920e7127b3afa8506713f23536651de312.tar.gz", - "hash": "sha256-2KUbS/HhzWW3kkkY1+RiWj9mJ76VEXw8lBJzcCFKzfY=" + "revision": "8fba98c80b48fa013820e0163c5096922fea4ddd", + "url": "https://github.com/nix-community/nix-index-database/archive/8fba98c80b48fa013820e0163c5096922fea4ddd.tar.gz", + "hash": "sha256-ZQ5z+fVhxYKtIFwtqGp5O0PD84BM1riASvqDaN5Xs+s=" }, - "nixos-generators": { + "unflake_github_nix-community_nixos-generators_ref_master": { "type": "Git", "repository": { "type": "GitHub", @@ -120,26 +211,20 @@ "url": "https://github.com/nix-community/nixos-generators/archive/8946737ff703382fda7623b9fab071d037e897d5.tar.gz", "hash": "sha256-nnVmNNKBi1YiBNPhKclNYDORoHkuKipoz7EtVnXO50A=" }, - "nixpkgs": { - "type": "Channel", - "name": "nixpkgs-unstable", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre993588.68a8af93ff42/nixexprs.tar.xz", - "hash": "sha256-Z5mLDoR8p0d7psIY4LnyaHHRykXngMcWXTZ9JWvtvPc=" - }, - "nixpkgs-stable": { + "unflake_github_nix-community_nixpkgs-lib": { "type": "Git", "repository": { "type": "GitHub", - "owner": "NixOS", - "repo": "nixpkgs" + "owner": "nix-community", + "repo": "nixpkgs.lib" }, - "branch": "nixos-25.11", + "branch": "master", "submodules": false, - "revision": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5", - "url": "https://github.com/NixOS/nixpkgs/archive/0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5.tar.gz", - "hash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=" + "revision": "2db1633d3742103a1eb856f5d479e6a0477ddc42", + "url": "https://github.com/nix-community/nixpkgs.lib/archive/2db1633d3742103a1eb856f5d479e6a0477ddc42.tar.gz", + "hash": "sha256-/+BaktM3RbRxi3yoH852My6ewF7IQ72WxFIZ4S2MQYg=" }, - "nixvim": { + "unflake_github_nix-community_nixvim_ref_main": { "type": "Git", "repository": { "type": "GitHub", @@ -148,47 +233,115 @@ }, "branch": "main", "submodules": false, - "revision": "7986a276960b4dfaed9bb2c3c438b5ba71ae08f1", - "url": "https://github.com/nix-community/nixvim/archive/7986a276960b4dfaed9bb2c3c438b5ba71ae08f1.tar.gz", - "hash": "sha256-DFwjggMV+nzCZpwK6Obxj9F+P59rbLVowGqHETfctBk=" + "revision": "297f9341476ba7f821a42d7a2805e206ef8c6ef8", + "url": "https://github.com/nix-community/nixvim/archive/297f9341476ba7f821a42d7a2805e206ef8c6ef8.tar.gz", + "hash": "sha256-Kgod3gZlhSp6WozZ2pFaclXbWpjs6kQLAtldoxb85Lc=" }, - "qmk_layout": { + "unflake_github_nix-systems_default": { "type": "Git", "repository": { - "type": "Git", - "url": "https://git.foss-syndicate.org/bpeetz/qmk_layout" + "type": "GitHub", + "owner": "nix-systems", + "repo": "default" }, - "branch": "prime", + "branch": "main", "submodules": false, - "revision": "4dff2e6ba5c9c80de3e3d2213ad28802814c3bba", - "url": null, - "hash": "sha256-dv5P3ahDICDacdzEmcyxrtKgbRWhVFiKQaLEz+WniGM=" + "revision": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "url": "https://github.com/nix-systems/default/archive/da67096a3b9bf56a91d16901293e51ba5b49a27e.tar.gz", + "hash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=" }, - "serverphone": { + "unflake_github_nix-systems_x86_64-linux": { "type": "Git", "repository": { - "type": "Git", - "url": "https://codeberg.org/vhack.eu/serverphone.git" + "type": "GitHub", + "owner": "nix-systems", + "repo": "x86_64-linux" }, - "branch": "prime", + "branch": "main", "submodules": false, - "revision": "2ac6ef2b49f4a7b8b0490a068bc2dba6767f0b7d", - "url": null, - "hash": "sha256-M2nQ9tuvt++ukXCdr4IhGqrQqpPpmjjlOZeAKjHQung=" + "revision": "2ecfcac5e15790ba6ce360ceccddb15ad16d08a8", + "url": "https://github.com/nix-systems/x86_64-linux/archive/2ecfcac5e15790ba6ce360ceccddb15ad16d08a8.tar.gz", + "hash": "sha256-Gtqg8b/v49BFDpDetjclCYXm8mAnTrUzR0JnE2nv5aw=" }, - "templates": { + "unflake_github_nixos_flake-compat_flake_false": { "type": "Git", "repository": { - "type": "Git", - "url": "https://codeberg.org/bpeetz/flake-templates.git" + "type": "GitHub", + "owner": "nixos", + "repo": "flake-compat" }, - "branch": "prime", + "branch": "master", "submodules": false, - "revision": "0294fb03df7c265f8fae24a9e775d69a953bbf03", - "url": null, - "hash": "sha256-rI1qMFzbXVjfEvmf2OS4upnibXpL21its6cCXqhz86o=" + "revision": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "url": "https://github.com/nixos/flake-compat/archive/5edf11c44bc78a0d334f6334cdaf7d60d732daab.tar.gz", + "hash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=" + }, + "unflake_github_nixos_nixpkgs_ref_nixos-25-05": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nixos", + "repo": "nixpkgs" + }, + "branch": "nixos-25.05", + "submodules": false, + "revision": "ac62194c3917d5f474c1a844b6fd6da2db95077d", + "url": "https://github.com/nixos/nixpkgs/archive/ac62194c3917d5f474c1a844b6fd6da2db95077d.tar.gz", + "hash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=" + }, + "unflake_github_nixos_nixpkgs_ref_nixos-26-05": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nixos", + "repo": "nixpkgs" + }, + "branch": "nixos-26.05", + "submodules": false, + "revision": "705e9929918b43bd7b715dc0a878ac870449bb03", + "url": "https://github.com/nixos/nixpkgs/archive/705e9929918b43bd7b715dc0a878ac870449bb03.tar.gz", + "hash": "sha256-ViA62qtL5za7V3d5I8OA9q9JcFhsVAiL5jVHwEclWqk=" + }, + "unflake_github_nixos_nixpkgs_ref_nixos-unstable": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nixos", + "repo": "nixpkgs" + }, + "branch": "nixos-unstable", + "submodules": false, + "revision": "64c08a7ca051951c8eae34e3e3cb1e202fe36786", + "url": "https://github.com/nixos/nixpkgs/archive/64c08a7ca051951c8eae34e3e3cb1e202fe36786.tar.gz", + "hash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=" + }, + "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nixos", + "repo": "nixpkgs" + }, + "branch": "nixpkgs-unstable", + "submodules": false, + "revision": "4100e830e085863741bc69b156ec4ccd53ab5be0", + "url": "https://github.com/nixos/nixpkgs/archive/4100e830e085863741bc69b156ec4ccd53ab5be0.tar.gz", + "hash": "sha256-NOF9NAREhxr50bbBfVcVOq+ArCMSoe8dP79Pk2uyARk=" + }, + "unflake_github_numtide_flake-utils": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "numtide", + "repo": "flake-utils" + }, + "branch": "main", + "submodules": false, + "revision": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "url": "https://github.com/numtide/flake-utils/archive/11707dc2f618dd54ca8739b309ec4fc024de578b.tar.gz", + "hash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=" }, - "treefmt-nix": { + "unflake_github_numtide_treefmt-nix": { "type": "Git", "repository": { "type": "GitHub", @@ -200,6 +353,45 @@ "revision": "790751ff7fd3801feeaf96d7dc416a8d581265ba", "url": "https://github.com/numtide/treefmt-nix/archive/790751ff7fd3801feeaf96d7dc416a8d581265ba.tar.gz", "hash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=" + }, + "unflake_github_numtide_treefmt-nix_ref_main": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "numtide", + "repo": "treefmt-nix" + }, + "branch": "main", + "submodules": false, + "revision": "790751ff7fd3801feeaf96d7dc416a8d581265ba", + "url": "https://github.com/numtide/treefmt-nix/archive/790751ff7fd3801feeaf96d7dc416a8d581265ba.tar.gz", + "hash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=" + }, + "unflake_github_oxalica_rust-overlay": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "oxalica", + "repo": "rust-overlay" + }, + "branch": "master", + "submodules": false, + "revision": "02f536e36eaee387594ce2a02d90ff678d056e0f", + "url": "https://github.com/oxalica/rust-overlay/archive/02f536e36eaee387594ce2a02d90ff678d056e0f.tar.gz", + "hash": "sha256-khIekZCrhy3lQom4AZTmgBPV3DOFgAiopLUyUtbVGhY=" + }, + "unflake_github_ryantm_agenix_ref_main": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ryantm", + "repo": "agenix" + }, + "branch": "main", + "submodules": false, + "revision": "b027ee29d959fda4b60b57566d64c98a202e0feb", + "url": "https://github.com/ryantm/agenix/archive/b027ee29d959fda4b60b57566d64c98a202e0feb.tar.gz", + "hash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=" } }, "version": 7 diff --git a/scripts/npins_to_unflake.jq b/scripts/npins_to_unflake.jq new file mode 100644 index 00000000..80e6b5a3 --- /dev/null +++ b/scripts/npins_to_unflake.jq @@ -0,0 +1,34 @@ +def make_url(value): + value.repository as $repo | + if value.type == "Git" then + if $repo.type == "Git" then + "git+\($repo.url)?ref=\(value.branch)" + elif $repo.type == "GitHub" then + "github:\($repo.owner)/\($repo.repo)/\(value.branch)" + elif $repo.type == "Forgejo" then + "git+\($repo.server)/\($repo.owner)/\($repo.repo)?ref=\(value.branch)" + else + error("Invalid repository type: '\($repo.type)'") + end + elif value.type == "GitRelease" then + if $repo.type == "GitHub" then + "github:\($repo.owner)/\($repo.repo)/\(value.version)" + else + error("Invalid repository type: '\($repo.type)'") + end + elif value.type == "Channel" then + empty + else + error("Invalid value type: '\(value.type)'") + end + ; + +"{ +\( + .pins | to_entries | map( + " \"\(.key)\" = { + url = \"\(make_url(.value))\"; + };" + ) | join("\n") + ) +}" diff --git a/scripts/unflake.sh b/scripts/unflake.sh new file mode 100755 index 00000000..e4aa816d --- /dev/null +++ b/scripts/unflake.sh @@ -0,0 +1,6 @@ +#! /usr/bin/env sh + +NIX_CONFIG="pure-eval = false" nix run -f https://codeberg.org/goldstein/unflake/archive/main.tar.gz unflake -- "$@" + + +# vim: ft=sh diff --git a/unflake.nix b/unflake.nix new file mode 100644 index 00000000..73451d14 --- /dev/null +++ b/unflake.nix @@ -0,0 +1,187 @@ +# @generated by https://codeberg.org/goldstein/unflake +let + indirect_deps = { + unflake_indirect_nixpkgs = builtins.getFlake "flake:nixpkgs"; + }; + specs = {}; + deps = indirect_deps // builtins.mapAttrs (_: v: + if builtins.typeOf v.outPath == "set" then + v.outPath + else if v?revision then + { outPath = v.outPath; rev = v.revision; } + else + { outPath = v.outPath; } + ) (import ./npins/default.nix); + injections = rec { + unflake_indirect_nixpkgs = { + }; + unflake_github_cachix_pre-commit-hooks-nix = { + flake-compat = "unflake_github_nixos_flake-compat_flake_false"; + gitignore = "unflake_github_hercules-ci_gitignore-nix"; + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + }; + unflake_github_hercules-ci_flake-parts = { + nixpkgs-lib = "unflake_github_nix-community_nixpkgs-lib"; + }; + unflake_github_hercules-ci_gitignore-nix = { + nixpkgs = "unflake_indirect_nixpkgs"; + }; + unflake_github_ipetkov_crane = { + }; + unflake_github_lnl7_nix-darwin_ref_master = { + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + }; + unflake_github_nix-community_nix-index-database_ref_main = { + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixos-unstable"; + }; + unflake_github_nix-community_nixvim_ref_main = { + flake-parts = "unflake_github_hercules-ci_flake-parts"; + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + systems = "unflake_github_nix-systems_default"; + }; + unflake_github_nix-community_disko_ref_master = { + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + }; + unflake_github_nix-community_home-manager_ref_master = { + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixos-unstable"; + }; + unflake_github_nix-community_impermanence_ref_master = { + home-manager = "unflake_github_nix-community_home-manager"; + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixos-unstable"; + }; + unflake_github_nix-community_nixos-generators_ref_master = { + nixlib = "unflake_github_nix-community_nixpkgs-lib"; + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + }; + unflake_github_nix-community_lanzaboote_ref_v1-0-0 = { + crane = "unflake_github_ipetkov_crane"; + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixos-unstable"; + pre-commit = "unflake_github_cachix_pre-commit-hooks-nix"; + rust-overlay = "unflake_github_oxalica_rust-overlay"; + }; + unflake_github_nix-community_home-manager = { + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixos-unstable"; + }; + unflake_github_nix-community_nixpkgs-lib = { + }; + unflake_github_nix-systems_default = { + }; + unflake_github_nix-systems_x86_64-linux = { + }; + unflake_github_nixos_nixpkgs_ref_nixos-25-05 = { + }; + unflake_github_nixos_nixpkgs_ref_nixos-26-05 = { + }; + unflake_github_nixos_nixpkgs_ref_nixos-unstable = { + }; + unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable = { + }; + unflake_github_numtide_treefmt-nix_ref_main = { + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + }; + unflake_github_numtide_flake-utils = { + systems = "unflake_github_nix-systems_default"; + }; + unflake_github_numtide_treefmt-nix = { + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + }; + unflake_github_oxalica_rust-overlay = { + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + }; + unflake_github_ryantm_agenix_ref_main = { + darwin = "unflake_github_lnl7_nix-darwin_ref_master"; + home-manager = "unflake_github_nix-community_home-manager"; + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixos-25-05"; + systems = "unflake_github_nix-systems_default"; + }; + unflake_git_https---git-lix-systems-lix-project-flake-compat_ref_main = { + }; + unflake_git_https---codeberg-org-bpeetz-flake-templates_ref_prime = { + flake-utils = "unflake_github_numtide_flake-utils"; + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + systems = "unflake_github_nix-systems_x86_64-linux"; + treefmt-nix = "unflake_github_numtide_treefmt-nix"; + }; + unflake_git_https---git-foss-syndicate-org-bpeetz-qmk_layout_ref_prime = { + flake-utils = "unflake_github_numtide_flake-utils"; + nixpkgs = "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable"; + systems = "unflake_github_nix-systems_x86_64-linux"; + treefmt-nix = "unflake_github_numtide_treefmt-nix"; + }; + unflake_git_https---git-foss-syndicate-org-vhack-eu-nix-library_ref_prime = { + }; + }; + inject = name: flake_path: subdir: + let + inputs = builtins.mapAttrs (_: dep: universe.${dep}) injections.${name} // { + inherit self; + }; + sourceInfo = deps.${name}; + outPath = "${sourceInfo.outPath}${subdir}"; + outputs = (import "${sourceInfo.outPath}/${flake_path}").outputs inputs; + self = outputs // sourceInfo // { + inherit inputs outputs outPath sourceInfo; + _type = "flake"; + _flake = true; + }; + in self; + universe = rec { + unflake_indirect_nixpkgs = inject "unflake_indirect_nixpkgs" "flake.nix" ""; + unflake_github_cachix_pre-commit-hooks-nix = inject "unflake_github_cachix_pre-commit-hooks-nix" "flake.nix" ""; + unflake_github_hercules-ci_flake-parts = inject "unflake_github_hercules-ci_flake-parts" "flake.nix" ""; + unflake_github_hercules-ci_gitignore-nix = inject "unflake_github_hercules-ci_gitignore-nix" "flake.nix" ""; + unflake_github_ipetkov_crane = inject "unflake_github_ipetkov_crane" "flake.nix" ""; + unflake_github_lnl7_nix-darwin_ref_master = inject "unflake_github_lnl7_nix-darwin_ref_master" "flake.nix" ""; + unflake_github_nix-community_nix-index-database_ref_main = inject "unflake_github_nix-community_nix-index-database_ref_main" "flake.nix" ""; + unflake_github_nix-community_nixvim_ref_main = inject "unflake_github_nix-community_nixvim_ref_main" "flake.nix" ""; + unflake_github_nix-community_disko_ref_master = inject "unflake_github_nix-community_disko_ref_master" "flake.nix" ""; + unflake_github_nix-community_home-manager_ref_master = inject "unflake_github_nix-community_home-manager_ref_master" "flake.nix" ""; + unflake_github_nix-community_impermanence_ref_master = inject "unflake_github_nix-community_impermanence_ref_master" "flake.nix" ""; + unflake_github_nix-community_nixos-generators_ref_master = inject "unflake_github_nix-community_nixos-generators_ref_master" "flake.nix" ""; + unflake_github_nix-community_lanzaboote_ref_v1-0-0 = inject "unflake_github_nix-community_lanzaboote_ref_v1-0-0" "flake.nix" ""; + unflake_github_nix-community_home-manager = inject "unflake_github_nix-community_home-manager" "flake.nix" ""; + unflake_github_nix-community_nixpkgs-lib = inject "unflake_github_nix-community_nixpkgs-lib" "flake.nix" ""; + unflake_github_nix-systems_default = inject "unflake_github_nix-systems_default" "flake.nix" ""; + unflake_github_nix-systems_x86_64-linux = inject "unflake_github_nix-systems_x86_64-linux" "flake.nix" ""; + unflake_github_nixos_nixpkgs_ref_nixos-25-05 = inject "unflake_github_nixos_nixpkgs_ref_nixos-25-05" "flake.nix" ""; + unflake_github_nixos_nixpkgs_ref_nixos-26-05 = inject "unflake_github_nixos_nixpkgs_ref_nixos-26-05" "flake.nix" ""; + unflake_github_nixos_nixpkgs_ref_nixos-unstable = inject "unflake_github_nixos_nixpkgs_ref_nixos-unstable" "flake.nix" ""; + unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable = inject "unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable" "flake.nix" ""; + unflake_github_nixos_flake-compat_flake_false = deps.unflake_github_nixos_flake-compat_flake_false; + unflake_github_numtide_treefmt-nix_ref_main = inject "unflake_github_numtide_treefmt-nix_ref_main" "flake.nix" ""; + unflake_github_numtide_flake-utils = inject "unflake_github_numtide_flake-utils" "flake.nix" ""; + unflake_github_numtide_treefmt-nix = inject "unflake_github_numtide_treefmt-nix" "flake.nix" ""; + unflake_github_oxalica_rust-overlay = inject "unflake_github_oxalica_rust-overlay" "flake.nix" ""; + unflake_github_ryantm_agenix_ref_main = inject "unflake_github_ryantm_agenix_ref_main" "flake.nix" ""; + unflake_git_https---git-lix-systems-lix-project-flake-compat_ref_main = inject "unflake_git_https---git-lix-systems-lix-project-flake-compat_ref_main" "flake.nix" ""; + unflake_git_https---codeberg-org-bpeetz-flake-templates_ref_prime = inject "unflake_git_https---codeberg-org-bpeetz-flake-templates_ref_prime" "flake.nix" ""; + unflake_git_https---git-foss-syndicate-org-bpeetz-qmk_layout_ref_prime = inject "unflake_git_https---git-foss-syndicate-org-bpeetz-qmk_layout_ref_prime" "flake.nix" ""; + unflake_git_https---git-foss-syndicate-org-vhack-eu-nix-library_ref_prime = inject "unflake_git_https---git-foss-syndicate-org-vhack-eu-nix-library_ref_prime" "flake.nix" ""; + }; + inputs = { + agenix = universe.unflake_github_ryantm_agenix_ref_main; + disko = universe.unflake_github_nix-community_disko_ref_master; + flake-compat = universe.unflake_git_https---git-lix-systems-lix-project-flake-compat_ref_main; + home-manager = universe.unflake_github_nix-community_home-manager_ref_master; + impermanence = universe.unflake_github_nix-community_impermanence_ref_master; + lanzaboote = universe.unflake_github_nix-community_lanzaboote_ref_v1-0-0; + library = universe.unflake_git_https---git-foss-syndicate-org-vhack-eu-nix-library_ref_prime; + nix-index-database = universe.unflake_github_nix-community_nix-index-database_ref_main; + nixos-generators = universe.unflake_github_nix-community_nixos-generators_ref_master; + nixpkgs = universe.unflake_github_nixos_nixpkgs_ref_nixos-unstable; + nixpkgs-stable = universe.unflake_github_nixos_nixpkgs_ref_nixos-26-05; + nixvim = universe.unflake_github_nix-community_nixvim_ref_main; + qmk_layout = universe.unflake_git_https---git-foss-syndicate-org-bpeetz-qmk_layout_ref_prime; + templates = universe.unflake_git_https---codeberg-org-bpeetz-flake-templates_ref_prime; + treefmt-nix = universe.unflake_github_numtide_treefmt-nix_ref_main; + }; +in inputs // { + withInputs = fn: let outputs = fn (inputs // { inherit self; }); self = outputs // { + inherit inputs outputs; + _type = "flake"; + outPath = builtins.toString ./.; + }; in self; + __functor = self: self.withInputs; + self = throw "to use inputs.self, write `import ./unflake.nix (inputs: ...)`"; + _unflake = { inherit specs deps injections; }; +} diff --git a/update.sh b/update.sh index 1a9656fa..25dd6bec 100755 --- a/update.sh +++ b/update.sh @@ -21,6 +21,7 @@ __update_sh_run() { unset __update_sh_command } +__update_sh_run unflake.sh --backend=npins __update_sh_run npins update __update_sh_run ./pkgs/update_pkgs.sh "$@" |
