diff options
| -rw-r--r-- | flake.nix | 34 | ||||
| -rw-r--r-- | flake/default.nix | 1 | ||||
| -rw-r--r-- | modules/by-name/di/direnv/module.nix | 3 | ||||
| -rw-r--r-- | modules/by-name/ni/nix/module.nix | 2 | ||||
| -rw-r--r-- | modules/by-name/ni/nixos-shell/module.nix | 2 | ||||
| -rw-r--r-- | modules/by-name/qu/qutebrowser/module.nix | 2 | ||||
| -rw-r--r-- | modules/by-name/ve/version/module.nix | 2 | ||||
| -rw-r--r-- | npins/default.nix | 260 | ||||
| -rw-r--r-- | npins/full.nix | 8 | ||||
| -rw-r--r-- | npins/sources.json | 368 | ||||
| -rw-r--r-- | pkgs/by-name/fu/fupdate/flake.nix | 4 | ||||
| -rw-r--r-- | pkgs/by-name/lf/lf-make-map/flake.nix | 4 | ||||
| -rw-r--r-- | pkgs/by-name/mp/mpdpopm/flake.nix | 6 | ||||
| -rw-r--r-- | pkgs/by-name/no/notify-run/flake.nix | 4 | ||||
| -rw-r--r-- | pkgs/by-name/ri/river-mk-keymap/flake.nix | 4 | ||||
| -rw-r--r-- | pkgs/by-name/ts/tskm/flake.nix | 4 | ||||
| -rwxr-xr-x | scripts/unflake.sh | 14 | ||||
| -rw-r--r-- | unflake.nix | 234 | ||||
| -rwxr-xr-x | update.sh | 3 |
19 files changed, 261 insertions, 698 deletions
@@ -14,28 +14,28 @@ inputs = {}; outputs = {self, ...}: let - sources = import ./npins/full.nix {}; + sources = import ./unflake.nix; # core - nixpkgs = sources.loadFlake "nixpkgs"; - nixpkgs-stable = sources.loadFlake "nixpkgs-stable"; - library = sources.loadFlake "library"; + nixpkgs = sources.nixpkgs; + nixpkgs-stable = sources.nixpkgs-stable; + library = sources.library; # modules - home-manager = sources.loadFlake "home-manager"; - nixos-generators = sources.loadFlake "nixos-generators"; - impermanence = sources.loadFlake "impermanence"; - agenix = sources.loadFlake "agenix"; - serverphone = sources.loadFlake "serverphone"; - disko = sources.loadFlake "disko"; - lanzaboote = sources.loadFlake "lanzaboote"; - nixvim = sources.loadFlake "nixvim"; - nix-index-database = sources.loadFlake "nix-index-database"; + home-manager = sources.home-manager; + nixos-generators = sources.nixos-generators; + impermanence = sources.impermanence; + agenix = sources.agenix; + serverphone = sources.serverphone; + disko = sources.disko; + lanzaboote = sources.lanzaboote; + nixvim = sources.nixvim; + nix-index-database = sources.nix-index-database; # external dependencies - treefmt-nix = sources.loadFlake "treefmt-nix"; - templates = sources.loadFlake "templates"; + treefmt-nix = sources.treefmt-nix; + templates = sources.templates; # my binaries - qmk_firmware = sources.loadFlake "qmk_firmware"; - turtle = sources.loadFlake "turtle"; + qmk_firmware = sources.qmk_firmware; + turtle = sources.turtle; system = "x86_64-linux"; diff --git a/flake/default.nix b/flake/default.nix index c35a5f55..099a4568 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -112,7 +112,6 @@ in { pkgs.alejandra pkgs.deadnix pkgs.nvd - pkgs.npins ]; }; }; diff --git a/modules/by-name/di/direnv/module.nix b/modules/by-name/di/direnv/module.nix index 55a694cf..baa0d954 100644 --- a/modules/by-name/di/direnv/module.nix +++ b/modules/by-name/di/direnv/module.nix @@ -16,8 +16,7 @@ }: let cfg = config.soispha.programs.direnv; - devshells = sources.loadFlake "devshells"; - nixpkgs = sources.loadFlake "nixpkgs"; + inherit (sources) devshells nixpkgs; pre-cache = pkgs.runCommand "pre-cache.sh" {} '' cat "${./pre-cache.sh}" > $out diff --git a/modules/by-name/ni/nix/module.nix b/modules/by-name/ni/nix/module.nix index 7caa8a8e..b7e64989 100644 --- a/modules/by-name/ni/nix/module.nix +++ b/modules/by-name/ni/nix/module.nix @@ -19,7 +19,7 @@ externalDependencies, ... }: let - nixpkgs = sources.loadFlake "nixpkgs"; + inherit (sources) nixpkgs; cfg = config.soispha.nix; in { diff --git a/modules/by-name/ni/nixos-shell/module.nix b/modules/by-name/ni/nixos-shell/module.nix index 3556a98b..1a0190c8 100644 --- a/modules/by-name/ni/nixos-shell/module.nix +++ b/modules/by-name/ni/nixos-shell/module.nix @@ -15,7 +15,7 @@ ... }: let cfg = config.soispha.nixos-shell; - nixpkgs = sources.loadFlake "nixpkgs"; + inherit (sources) nixpkgs; in { options.soispha.nixos-shell = { enable = lib.mkEnableOption "nixos-shell"; diff --git a/modules/by-name/qu/qutebrowser/module.nix b/modules/by-name/qu/qutebrowser/module.nix index 51c1b239..d7689793 100644 --- a/modules/by-name/qu/qutebrowser/module.nix +++ b/modules/by-name/qu/qutebrowser/module.nix @@ -80,7 +80,7 @@ in { config = lib.mkIf cfg.enable { home-manager.users.soispha = { disabledModules = [ - "${sources.sources.home-manager}/modules/programs/qutebrowser.nix" + "${sources.home-manager}/modules/programs/qutebrowser.nix" ]; imports = [ ./module.hm.nix diff --git a/modules/by-name/ve/version/module.nix b/modules/by-name/ve/version/module.nix index 28328d1d..d666695d 100644 --- a/modules/by-name/ve/version/module.nix +++ b/modules/by-name/ve/version/module.nix @@ -15,7 +15,7 @@ }: let cfg = config.soispha.version; - nixpkgs = sources.loadFlake "nixpkgs"; + inherit (sources) nixpkgs; in { options.soispha.version = { enable = lib.mkEnableOption "storing the git revision in /etc/nixpkgs-git-revision"; diff --git a/npins/default.nix b/npins/default.nix deleted file mode 100644 index 8ec5eca6..00000000 --- a/npins/default.nix +++ /dev/null @@ -1,260 +0,0 @@ -/* - This file is provided under the MIT licence: - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ -# Generated by npins. Do not modify; will be overwritten regularly -let - # Backwards-compatibly make something that previously didn't take any arguments take some - # The function must return an attrset, and will unfortunately be eagerly evaluated - # Same thing, but it catches eval errors on the default argument so that one may still call it with other arguments - mkFunctor = - fn: - let - e = builtins.tryEval (fn { }); - in - (if e.success then e.value else { error = fn { }; }) // { __functor = _self: fn; }; - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 - range = - first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 - stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 - stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); - concatStrings = builtins.concatStringsSep ""; - - # If the environment variable NPINS_OVERRIDE_${name} is set, then use - # the path directly as opposed to the fetched source. - # (Taken from Niv for compatibility) - mayOverride = - name: path: - let - envVarName = "NPINS_OVERRIDE_${saneName}"; - saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name; - ersatz = builtins.getEnv envVarName; - in - if ersatz == "" then - path - else - # this turns the string into an actual Nix path (for both absolute and - # relative paths) - builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( - if builtins.substring 0 1 ersatz == "/" then - /. + ersatz - else - /. + builtins.getEnv "PWD" + "/${ersatz}" - ); - - mkSource = - name: spec: - { - pkgs ? null, - }: - assert spec ? type; - let - # Unify across builtin and pkgs fetchers. - # `fetchGit` requires a wrapper because of slight API differences. - fetchers = - if pkgs == null then - { - inherit (builtins) fetchTarball fetchurl; - # Frustratingly, due to flakes and `fetchTree`, `fetchGit` - # has a different signature than the other builtin - # fetchers - fetchGit = args: (builtins.fetchGit args).outPath; - } - else - { - fetchTarball = - { - url, - sha256, - }: - pkgs.fetchzip { - inherit url sha256; - extension = "tar"; - }; - inherit (pkgs) fetchurl; - fetchGit = - { - url, - submodules, - rev, - name, - narHash, - }: - pkgs.fetchgit { - inherit url rev name; - fetchSubmodules = submodules; - hash = narHash; - }; - }; - - path = - if spec.type == "Git" then - mkGitSource fetchers spec - else if spec.type == "GitRelease" then - mkGitSource fetchers spec - else if spec.type == "PyPi" then - mkPyPiSource fetchers spec - else if spec.type == "Channel" then - mkChannelSource fetchers spec - else if spec.type == "Url" || spec.type == "MutableUrl" then - mkUrlSource fetchers spec - else if spec.type == "Container" then - mkContainerSource pkgs spec - else - builtins.throw "Unknown source type ${spec.type}"; - in - spec // { outPath = mayOverride name path; }; - - mkGitSource = - { - fetchTarball, - fetchGit, - ... - }: - { - repository, - revision, - url ? null, - submodules, - hash, - ... - }: - assert repository ? type; - # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository - # In the latter case, there we will always be an url to the tarball - if url != null && !submodules then - fetchTarball { - inherit url; - sha256 = hash; - } - else - let - url = - if repository.type == "Git" then - repository.url - else if repository.type == "GitHub" then - "https://github.com/${repository.owner}/${repository.repo}.git" - else if repository.type == "GitLab" then - "${repository.server}/${repository.repo_path}.git" - else if repository.type == "Forgejo" then - "${repository.server}/${repository.owner}/${repository.repo}.git" - else - throw "Unrecognized repository type ${repository.type}"; - urlToName = - url: rev: - let - matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; - - short = builtins.substring 0 7 rev; - - appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; - in - "${if matched == null then "source" else builtins.head matched}${appendShort}"; - name = urlToName url revision; - in - fetchGit { - rev = revision; - narHash = hash; - - inherit name submodules url; - }; - - mkPyPiSource = - { fetchurl, ... }: - { - url, - hash, - ... - }: - fetchurl { - inherit url; - sha256 = hash; - }; - - mkChannelSource = - { fetchTarball, ... }: - { - url, - hash, - ... - }: - fetchTarball { - inherit url; - sha256 = hash; - }; - - mkUrlSource = - { - fetchTarball, - fetchurl, - ... - }: - { - url, - hash, - unpack, - ... - }: - (if unpack then fetchTarball else fetchurl) { - inherit url; - sha256 = hash; - }; - - mkContainerSource = - pkgs: - { - image_name, - image_tag, - image_digest, - hash, - ... - }@args: - if pkgs == null then - builtins.throw "container sources require passing in a Nixpkgs value: https://github.com/andir/npins/blob/master/README.md#using-the-nixpkgs-fetchers" - else - pkgs.dockerTools.pullImage ( - { - imageName = image_name; - imageDigest = image_digest; - finalImageTag = image_tag; - hash = hash; - } - // (if args.arch or null != null then { arch = args.arch; } else { }) - ); - -in -mkFunctor ( - { - input ? ./sources.json, - }: - let - data = - if builtins.isPath input then - # while `readFile` will throw an error anyways if the path doesn't exist, - # we still need to check beforehand because *our* error can be caught but not the one from the builtin - # See: <https://git.lix.systems/lix-project/lix/issues/1098> - if builtins.pathExists input then - builtins.fromJSON (builtins.readFile input) - else - throw "Input path ${toString input} does not exist" - else if builtins.isAttrs input then - input - else - throw "Unsupported input type ${builtins.typeOf input}, must be a path or an attrset"; - version = data.version; - in - if version == 8 then - builtins.mapAttrs (name: spec: mkFunctor (mkSource name spec)) data.pins - else - throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" -) diff --git a/npins/full.nix b/npins/full.nix deleted file mode 100644 index 0fb56679..00000000 --- a/npins/full.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: let - sources = import ../unflake.nix; - loadFlake = input: sources."${input}"; - - # loadFlake = flakeInput: (import sources.flake-compat {src = sources."${flakeInput}";}).outputs; -in { - inherit sources loadFlake; -} diff --git a/npins/sources.json b/npins/sources.json deleted file mode 100644 index 427e6dc5..00000000 --- a/npins/sources.json +++ /dev/null @@ -1,368 +0,0 @@ -{ - "pins": { - "unflake_git_file----home-soispha-repos-nix-own-devshells": { - "type": "Git", - "repository": { - "type": "Git", - "url": "file:///home/soispha/repos/nix/own/devshells" - }, - "branch": "prime", - "submodules": false, - "revision": "eeadc1096d4f122e09109bb10195ee9a8b6e3be6", - "url": null, - "hash": "sha256-qnSNf9dhKAAFmRTDKCzz8+PDyAvQ+wG3vCoOJCChdxU=" - }, - "unflake_git_https---codeberg-org-bpeetz-flake-templates_ref_prime": { - "type": "Git", - "repository": { - "type": "Forgejo", - "server": "https://codeberg.org/", - "owner": "bpeetz", - "repo": "flake-templates" - }, - "branch": "prime", - "submodules": false, - "revision": "0294fb03df7c265f8fae24a9e775d69a953bbf03", - "url": "https://codeberg.org/bpeetz/flake-templates/archive/0294fb03df7c265f8fae24a9e775d69a953bbf03.tar.gz", - "hash": "sha256-rI1qMFzbXVjfEvmf2OS4upnibXpL21its6cCXqhz86o=" - }, - "unflake_git_https---git-foss-syndicate-org-bpeetz-devshells_ref_prime": { - "type": "Git", - "repository": { - "type": "Git", - "url": "https://git.foss-syndicate.org/bpeetz/devshells" - }, - "branch": "prime", - "submodules": false, - "revision": "eeadc1096d4f122e09109bb10195ee9a8b6e3be6", - "url": null, - "hash": "sha256-qnSNf9dhKAAFmRTDKCzz8+PDyAvQ+wG3vCoOJCChdxU=" - }, - "unflake_git_https---git-foss-syndicate-org-bpeetz-forks-atuin_ref_main": { - "type": "Git", - "repository": { - "type": "Git", - "url": "https://git.foss-syndicate.org/bpeetz/forks/atuin" - }, - "branch": "main", - "submodules": false, - "revision": "3ba41b526d57368bfa8d151fd777865370c24f6b", - "url": null, - "hash": "sha256-6upceGLe7W2i00Qsv4fPQUuAIAUpHK8Tm/dsmoQ4SzI=" - }, - "unflake_git_https---git-foss-syndicate-org-bpeetz-qmk_layout_ref_prime": { - "type": "Git", - "repository": { - "type": "Git", - "url": "https://git.foss-syndicate.org/bpeetz/qmk_layout" - }, - "branch": "prime", - "submodules": false, - "revision": "4dff2e6ba5c9c80de3e3d2213ad28802814c3bba", - "url": null, - "hash": "sha256-dv5P3ahDICDacdzEmcyxrtKgbRWhVFiKQaLEz+WniGM=" - }, - "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", - "server": "https://git.lix.systems/", - "owner": "lix-project", - "repo": "flake-compat" - }, - "branch": "main", - "submodules": false, - "revision": "382052b74656a369c5408822af3f2501e9b1af81", - "url": "https://git.lix.systems/lix-project/flake-compat/archive/382052b74656a369c5408822af3f2501e9b1af81.tar.gz", - "hash": "sha256-Eg9b/rq/ECYwNwEXs5i9wHyhxNI0JrYx2srdI2uZMaQ=" - }, - "unflake_github_cachix_pre-commit-hooks-nix": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "cachix", - "repo": "pre-commit-hooks.nix" - }, - "branch": "master", - "submodules": false, - "revision": "43b3c1ab9d40fb1dbb008f451988a91e375825e9", - "url": "https://github.com/cachix/pre-commit-hooks.nix/archive/43b3c1ab9d40fb1dbb008f451988a91e375825e9.tar.gz", - "hash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=" - }, - "unflake_github_hercules-ci_flake-parts": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "hercules-ci", - "repo": "flake-parts" - }, - "branch": "main", - "submodules": false, - "revision": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a", - "url": "https://github.com/hercules-ci/flake-parts/archive/427bf4bd9435fdf21321c8cc628c24efc14c0f7a.tar.gz", - "hash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=" - }, - "unflake_github_ipetkov_crane": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "ipetkov", - "repo": "crane" - }, - "branch": "master", - "submodules": false, - "revision": "6ed595a5527c0ec9563e0e06417f1b8fc88ccb66", - "url": "https://github.com/ipetkov/crane/archive/6ed595a5527c0ec9563e0e06417f1b8fc88ccb66.tar.gz", - "hash": "sha256-MWnmk87W8akPIKh+yd0bTfXvlyumKQVh5l/KTbgI95o=" - }, - "unflake_github_lnl7_nix-darwin_ref_master": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "lnl7", - "repo": "nix-darwin" - }, - "branch": "master", - "submodules": false, - "revision": "4cff07de74b50e64bdd68cd4e722ab5b6b35ee48", - "url": "https://github.com/lnl7/nix-darwin/archive/4cff07de74b50e64bdd68cd4e722ab5b6b35ee48.tar.gz", - "hash": "sha256-oQFip+v0luP8NIxJzmiW4Wu8bILsbFWom5l0zonl8hQ=" - }, - "unflake_github_nix-community_disko_ref_master": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "disko" - }, - "branch": "master", - "submodules": false, - "revision": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1", - "url": "https://github.com/nix-community/disko/archive/ff8702b4de27f72b4c78573dfb89ec74e36abdf1.tar.gz", - "hash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=" - }, - "unflake_github_nix-community_home-manager_ref_master": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "home-manager" - }, - "branch": "master", - "submodules": false, - "revision": "353742587cbaf079b3caee743115d037bc51fea6", - "url": "https://github.com/nix-community/home-manager/archive/353742587cbaf079b3caee743115d037bc51fea6.tar.gz", - "hash": "sha256-MTGMFlLDTklsXhCp4r5GXB4VAVadPdalXLvUjd/K7h0=" - }, - "unflake_github_nix-community_impermanence_ref_master": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "impermanence" - }, - "branch": "master", - "submodules": false, - "revision": "7b1d382faf603b6d264f58627330f9faa5cba149", - "url": "https://github.com/nix-community/impermanence/archive/7b1d382faf603b6d264f58627330f9faa5cba149.tar.gz", - "hash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=" - }, - "unflake_github_nix-community_lanzaboote_ref_v1-1-0": { - "type": "GitRelease", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "lanzaboote" - }, - "pre_releases": false, - "version_upper_bound": null, - "release_prefix": null, - "submodules": false, - "version": "v1.1.0", - "revision": "7c9a54a7f87b4539ddbd8bda09a8a5f5f9361aa9", - "url": "https://api.github.com/repos/nix-community/lanzaboote/tarball/refs/tags/v1.1.0", - "hash": "sha256-hqijVSEETttmo8Okql9/LG0Ua34hdciKW1a5zzlj8mU=" - }, - "unflake_github_nix-community_nix-index-database_ref_main": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "nix-index-database" - }, - "branch": "main", - "submodules": false, - "revision": "c7962dc97b45129df8d751bedaf37beb5a17706e", - "url": "https://github.com/nix-community/nix-index-database/archive/c7962dc97b45129df8d751bedaf37beb5a17706e.tar.gz", - "hash": "sha256-IM5CYtf86W4w8eUPpKcY/LpdHElmVBtJhaKnoTKxZEA=" - }, - "unflake_github_nix-community_nixos-generators_ref_master": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "nixos-generators" - }, - "branch": "master", - "submodules": false, - "revision": "8946737ff703382fda7623b9fab071d037e897d5", - "url": "https://github.com/nix-community/nixos-generators/archive/8946737ff703382fda7623b9fab071d037e897d5.tar.gz", - "hash": "sha256-nnVmNNKBi1YiBNPhKclNYDORoHkuKipoz7EtVnXO50A=" - }, - "unflake_github_nix-community_nixpkgs-lib": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "nixpkgs.lib" - }, - "branch": "master", - "submodules": false, - "revision": "6c072ec3b5c474f370866628582bb6533fe6f822", - "url": "https://github.com/nix-community/nixpkgs.lib/archive/6c072ec3b5c474f370866628582bb6533fe6f822.tar.gz", - "hash": "sha256-auVxpg6qxDnBG7bhSgqcolnbzsNfYvUNTyvOZJoHcrY=" - }, - "unflake_github_nix-community_nixvim_ref_main": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "nixvim" - }, - "branch": "main", - "submodules": false, - "revision": "fe68d88884ac91ce1d17e955ac0ae486ff8bcdf0", - "url": "https://github.com/nix-community/nixvim/archive/fe68d88884ac91ce1d17e955ac0ae486ff8bcdf0.tar.gz", - "hash": "sha256-42RoRqxcuMB/MMLQU65StwyrPzdahxDXR3Sy58AzOMM=" - }, - "unflake_github_nix-systems_default_ref_main": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-systems", - "repo": "default" - }, - "branch": "main", - "submodules": false, - "revision": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "url": "https://github.com/nix-systems/default/archive/da67096a3b9bf56a91d16901293e51ba5b49a27e.tar.gz", - "hash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=" - }, - "unflake_github_nix-systems_default_ref_main_flake_false": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-systems", - "repo": "default" - }, - "branch": "main", - "submodules": false, - "revision": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "url": "https://github.com/nix-systems/default/archive/da67096a3b9bf56a91d16901293e51ba5b49a27e.tar.gz", - "hash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=" - }, - "unflake_github_nixos_flake-compat_flake_false": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "flake-compat" - }, - "branch": "master", - "submodules": false, - "revision": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "url": "https://github.com/nixos/flake-compat/archive/5edf11c44bc78a0d334f6334cdaf7d60d732daab.tar.gz", - "hash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=" - }, - "unflake_github_nixos_nixpkgs_ref_nixos-unstable": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-unstable", - "submodules": false, - "revision": "0ae2bc1419c3f345984c2629e72e7a631820fa4d", - "url": "https://github.com/nixos/nixpkgs/archive/0ae2bc1419c3f345984c2629e72e7a631820fa4d.tar.gz", - "hash": "sha256-vXNVDVtvfiQuXthP0NHPFdNvvMTkGpx0UP8oddIWbNk=" - }, - "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=" - }, - "unflake_github_numtide_treefmt-nix_ref_main": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "numtide", - "repo": "treefmt-nix" - }, - "branch": "main", - "submodules": false, - "revision": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa", - "url": "https://github.com/numtide/treefmt-nix/archive/27b3b12a8e6375f28ebe122f07d230ca5459bbfa.tar.gz", - "hash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=" - }, - "unflake_github_oxalica_rust-overlay": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "oxalica", - "repo": "rust-overlay" - }, - "branch": "master", - "submodules": false, - "revision": "99607a06c2ea1290cd3258c11d1416dde9201f94", - "url": "https://github.com/oxalica/rust-overlay/archive/99607a06c2ea1290cd3258c11d1416dde9201f94.tar.gz", - "hash": "sha256-WLhxXPMCzbeufsDZxdzkurLGBq74GX+JgLX8fFy6HZs=" - }, - "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=" - }, - "unflake_tarball_https---channels-nixos-org-nixos-26-05-nixexprs-tar-zst": { - "type": "Url", - "url": "https://channels.nixos.org/nixos-26.05/nixexprs.tar.zst", - "unpack": true, - "hash": "sha256-stgzvREl3lC3UYnMU+4ttB1d3acWTzmMryDLEnRi0Ew=" - }, - "unflake_tarball_https---channels-nixos-org-nixos-unstable-nixexprs-tar-zst": { - "type": "Url", - "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst", - "unpack": true, - "hash": "sha256-kSR/jfpR4cE26YRZ8exQkoRbEA30vyWimajwZANYYaE=" - } - }, - "version": 8 -} diff --git a/pkgs/by-name/fu/fupdate/flake.nix b/pkgs/by-name/fu/fupdate/flake.nix index 22b0957f..ca4d41c8 100644 --- a/pkgs/by-name/fu/fupdate/flake.nix +++ b/pkgs/by-name/fu/fupdate/flake.nix @@ -14,9 +14,9 @@ outputs = {...}: let system = "x86_64-linux"; - sources = import ../../../../npins/full.nix {}; + sources = import ../../../../unflake.nix; - pkgs = (sources.loadFlake "nixpkgs").legacyPackages."${system}"; + pkgs = sources.nixpkgs.legacyPackages."${system}"; in { devShells."${system}".default = pkgs.mkShell { packages = [ diff --git a/pkgs/by-name/lf/lf-make-map/flake.nix b/pkgs/by-name/lf/lf-make-map/flake.nix index 2d1e93a2..743103b6 100644 --- a/pkgs/by-name/lf/lf-make-map/flake.nix +++ b/pkgs/by-name/lf/lf-make-map/flake.nix @@ -14,9 +14,9 @@ outputs = {...}: let system = "x86_64-linux"; - sources = import ../../../../npins/full.nix {}; + sources = import ../../../../unflake.nix; - pkgs = (sources.loadFlake "nixpkgs").legacyPackages."${system}"; + pkgs = sources.nixpkgs.legacyPackages."${system}"; in { devShells."${system}".default = pkgs.mkShell { packages = [ diff --git a/pkgs/by-name/mp/mpdpopm/flake.nix b/pkgs/by-name/mp/mpdpopm/flake.nix index d672bd1b..d2e37260 100644 --- a/pkgs/by-name/mp/mpdpopm/flake.nix +++ b/pkgs/by-name/mp/mpdpopm/flake.nix @@ -15,10 +15,10 @@ outputs = {self, ...}: let system = "x86_64-linux"; - sources = import ../../../../npins/full.nix {}; + sources = import ../../../../unflake.nix; - pkgs = (sources.loadFlake "nixpkgs").legacyPackages."${system}"; - treefmt-nix = sources.loadFlake "treefmt-nix"; + pkgs = sources.nixpkgs.legacyPackages."${system}"; + inherit (sources) treefmt-nix; treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;}; in { diff --git a/pkgs/by-name/no/notify-run/flake.nix b/pkgs/by-name/no/notify-run/flake.nix index ea5fecb2..f8649e8f 100644 --- a/pkgs/by-name/no/notify-run/flake.nix +++ b/pkgs/by-name/no/notify-run/flake.nix @@ -15,9 +15,9 @@ outputs = {...}: let system = "x86_64-linux"; - sources = import ../../../../npins/full.nix {}; + sources = import ../../../../unflake.nix; - pkgs = (sources.loadFlake "nixpkgs").legacyPackages."${system}"; + pkgs = sources.nixpkgs.legacyPackages."${system}"; in { devShells."${system}".default = pkgs.mkShell { packages = [ diff --git a/pkgs/by-name/ri/river-mk-keymap/flake.nix b/pkgs/by-name/ri/river-mk-keymap/flake.nix index d1467506..6cf70c97 100644 --- a/pkgs/by-name/ri/river-mk-keymap/flake.nix +++ b/pkgs/by-name/ri/river-mk-keymap/flake.nix @@ -16,8 +16,8 @@ outputs = {...}: let system = "x86_64-linux"; - sources = import ../../../../npins/full.nix {}; - pkgs = (sources.loadFlake "nixpkgs").legacyPackages."${system}"; + sources = import ../../../../unflake.nix; + pkgs = sources.nixpkgs.legacyPackages."${system}"; nativeBuildInputs = [ pkgs.pkg-config diff --git a/pkgs/by-name/ts/tskm/flake.nix b/pkgs/by-name/ts/tskm/flake.nix index e4d22c09..a4a010ae 100644 --- a/pkgs/by-name/ts/tskm/flake.nix +++ b/pkgs/by-name/ts/tskm/flake.nix @@ -16,8 +16,8 @@ outputs = {...}: let system = "x86_64-linux"; - sources = import ../../../../npins/full.nix {}; - pkgs = (sources.loadFlake "nixpkgs").legacyPackages."${system}"; + sources = import ../../../../unflake.nix; + pkgs = sources.nixpkgs.legacyPackages."${system}"; in { devShells."${system}".default = pkgs.mkShell { buildInputs = [ diff --git a/scripts/unflake.sh b/scripts/unflake.sh index 2404260a..f916759a 100755 --- a/scripts/unflake.sh +++ b/scripts/unflake.sh @@ -2,20 +2,6 @@ set -e -# HACK(@bpeetz): unflake doesn't support npins version 8 yet, so we pretend to still use -# version 7. -# Essentially, we are abusing the fact that `npins` will look at `NPINS_DIRECTORY` while -# unflake doesn't. -# <2026-06-13> -NPINS_DIRECTORY="$(mktemp -t "npins_fake_dir_for_unflake_XXXXX" -d)" -export NPINS_DIRECTORY - -mv npins/sources.json "$NPINS_DIRECTORY/" -jq '.version = 7' <"$NPINS_DIRECTORY/sources.json" >npins/sources.json - NIX_CONFIG="pure-eval = false" nix run -f https://codeberg.org/goldstein/unflake/archive/main.tar.gz unflake -- "$@" -mv "$NPINS_DIRECTORY/sources.json" npins/sources.json -rmdir "$NPINS_DIRECTORY" - # vim: ft=sh diff --git a/unflake.nix b/unflake.nix index 67fc24f3..e3dffaa3 100644 --- a/unflake.nix +++ b/unflake.nix @@ -2,15 +2,231 @@ let indirect_deps = { }; - 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); + specs = rec { + unflake_github_cachix_pre-commit-hooks-nix = { + type = "github"; + owner = "cachix"; + repo = "pre-commit-hooks.nix"; + rev = "43b3c1ab9d40fb1dbb008f451988a91e375825e9"; + lastModified = 1784288435; + narHash = "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8="; + }; + unflake_github_hercules-ci_flake-parts = { + type = "github"; + owner = "hercules-ci"; + repo = "flake-parts"; + rev = "427bf4bd9435fdf21321c8cc628c24efc14c0f7a"; + lastModified = 1785627969; + narHash = "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw="; + }; + unflake_github_ipetkov_crane = { + type = "github"; + owner = "ipetkov"; + repo = "crane"; + rev = "6ed595a5527c0ec9563e0e06417f1b8fc88ccb66"; + lastModified = 1787074141; + narHash = "sha256-MWnmk87W8akPIKh+yd0bTfXvlyumKQVh5l/KTbgI95o="; + }; + unflake_github_lnl7_nix-darwin_ref_master = { + type = "github"; + owner = "lnl7"; + repo = "nix-darwin"; + rev = "4cff07de74b50e64bdd68cd4e722ab5b6b35ee48"; + lastModified = 1786845137; + narHash = "sha256-oQFip+v0luP8NIxJzmiW4Wu8bILsbFWom5l0zonl8hQ="; + }; + unflake_github_nix-community_nix-index-database_ref_main = { + type = "github"; + owner = "nix-community"; + repo = "nix-index-database"; + rev = "c7962dc97b45129df8d751bedaf37beb5a17706e"; + lastModified = 1786852476; + narHash = "sha256-IM5CYtf86W4w8eUPpKcY/LpdHElmVBtJhaKnoTKxZEA="; + }; + unflake_github_nix-community_nixvim_ref_main = { + type = "github"; + owner = "nix-community"; + repo = "nixvim"; + rev = "d0d62a2b5027da689b4e8d5ee43f1cf83f2e975d"; + lastModified = 1787151631; + narHash = "sha256-EblMdrDFBFNNlUPm5zUQdh0j6gDx+OFQPv7LFE4B5AA="; + }; + unflake_github_nix-community_disko_ref_master = { + type = "github"; + owner = "nix-community"; + repo = "disko"; + rev = "ff8702b4de27f72b4c78573dfb89ec74e36abdf1"; + lastModified = 1781152676; + narHash = "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o="; + }; + unflake_github_nix-community_home-manager_ref_master = { + type = "github"; + owner = "nix-community"; + repo = "home-manager"; + rev = "3c3ede6ad886a6d9b0938ef19112523118fe62c2"; + lastModified = 1787152495; + narHash = "sha256-zWjKwcMt0h+FIr0lgn0PWVN/24+IfNf4RhfL6hId2b4="; + }; + unflake_github_nix-community_impermanence_ref_master = { + type = "github"; + owner = "nix-community"; + repo = "impermanence"; + rev = "7b1d382faf603b6d264f58627330f9faa5cba149"; + lastModified = 1769548169; + narHash = "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y="; + }; + unflake_github_nix-community_nixos-generators_ref_master = { + type = "github"; + owner = "nix-community"; + repo = "nixos-generators"; + rev = "8946737ff703382fda7623b9fab071d037e897d5"; + lastModified = 1769813415; + narHash = "sha256-nnVmNNKBi1YiBNPhKclNYDORoHkuKipoz7EtVnXO50A="; + }; + unflake_github_nix-community_lanzaboote_ref_v1-1-0 = { + type = "github"; + owner = "nix-community"; + repo = "lanzaboote"; + rev = "7c9a54a7f87b4539ddbd8bda09a8a5f5f9361aa9"; + lastModified = 1782141370; + narHash = "sha256-hqijVSEETttmo8Okql9/LG0Ua34hdciKW1a5zzlj8mU="; + }; + unflake_github_nix-community_nixpkgs-lib = { + type = "github"; + owner = "nix-community"; + repo = "nixpkgs.lib"; + rev = "6c072ec3b5c474f370866628582bb6533fe6f822"; + lastModified = 1786841782; + narHash = "sha256-auVxpg6qxDnBG7bhSgqcolnbzsNfYvUNTyvOZJoHcrY="; + }; + unflake_github_nix-systems_default_ref_main = { + type = "github"; + owner = "nix-systems"; + repo = "default"; + rev = "da67096a3b9bf56a91d16901293e51ba5b49a27e"; + lastModified = 1681028828; + narHash = "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768="; + }; + unflake_github_nixos_nixpkgs_ref_nixos-unstable = { + type = "github"; + owner = "nixos"; + repo = "nixpkgs"; + rev = "0ae2bc1419c3f345984c2629e72e7a631820fa4d"; + lastModified = 1787070829; + narHash = "sha256-vXNVDVtvfiQuXthP0NHPFdNvvMTkGpx0UP8oddIWbNk="; + }; + unflake_github_nixos_flake-compat = { + type = "github"; + owner = "nixos"; + repo = "flake-compat"; + rev = "5edf11c44bc78a0d334f6334cdaf7d60d732daab"; + lastModified = 1767039857; + narHash = "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns="; + }; + unflake_github_numtide_treefmt-nix_ref_main = { + type = "github"; + owner = "numtide"; + repo = "treefmt-nix"; + rev = "27b3b12a8e6375f28ebe122f07d230ca5459bbfa"; + lastModified = 1786901030; + narHash = "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE="; + }; + unflake_github_numtide_flake-utils = { + type = "github"; + owner = "numtide"; + repo = "flake-utils"; + rev = "11707dc2f618dd54ca8739b309ec4fc024de578b"; + lastModified = 1731533236; + narHash = "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI="; + }; + unflake_github_oxalica_rust-overlay = { + type = "github"; + owner = "oxalica"; + repo = "rust-overlay"; + rev = "99607a06c2ea1290cd3258c11d1416dde9201f94"; + lastModified = 1787108576; + narHash = "sha256-WLhxXPMCzbeufsDZxdzkurLGBq74GX+JgLX8fFy6HZs="; + }; + unflake_github_ryantm_agenix_ref_main = { + type = "github"; + owner = "ryantm"; + repo = "agenix"; + rev = "b027ee29d959fda4b60b57566d64c98a202e0feb"; + lastModified = 1770165109; + narHash = "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I="; + }; + unflake_git_https---git-foss-syndicate-org-bpeetz-forks-atuin_ref_main = { + type = "git"; + url = "https://git.foss-syndicate.org/bpeetz/forks/atuin"; + ref = "main"; + rev = "3ba41b526d57368bfa8d151fd777865370c24f6b"; + revCount = 1836; + lastModified = 1781440499; + narHash = "sha256-6upceGLe7W2i00Qsv4fPQUuAIAUpHK8Tm/dsmoQ4SzI="; + }; + unflake_git_https---git-lix-systems-lix-project-flake-compat_ref_main = { + type = "git"; + url = "https://git.lix.systems/lix-project/flake-compat"; + ref = "main"; + rev = "382052b74656a369c5408822af3f2501e9b1af81"; + revCount = 94; + lastModified = 1777699697; + narHash = "sha256-Eg9b/rq/ECYwNwEXs5i9wHyhxNI0JrYx2srdI2uZMaQ="; + }; + unflake_git_https---codeberg-org-bpeetz-flake-templates_ref_prime = { + type = "git"; + url = "https://codeberg.org/bpeetz/flake-templates"; + ref = "prime"; + rev = "0294fb03df7c265f8fae24a9e775d69a953bbf03"; + revCount = 204; + lastModified = 1733053857; + narHash = "sha256-rI1qMFzbXVjfEvmf2OS4upnibXpL21its6cCXqhz86o="; + }; + unflake_git_https---git-foss-syndicate-org-bpeetz-devshells_ref_prime = { + type = "git"; + url = "https://git.foss-syndicate.org/bpeetz/devshells"; + ref = "prime"; + rev = "eeadc1096d4f122e09109bb10195ee9a8b6e3be6"; + revCount = 3; + lastModified = 1786571173; + narHash = "sha256-qnSNf9dhKAAFmRTDKCzz8+PDyAvQ+wG3vCoOJCChdxU="; + }; + unflake_git_https---git-foss-syndicate-org-bpeetz-qmk_layout_ref_prime = { + type = "git"; + url = "https://git.foss-syndicate.org/bpeetz/qmk_layout"; + ref = "prime"; + rev = "4dff2e6ba5c9c80de3e3d2213ad28802814c3bba"; + revCount = 39; + lastModified = 1753517111; + narHash = "sha256-dv5P3ahDICDacdzEmcyxrtKgbRWhVFiKQaLEz+WniGM="; + }; + unflake_git_https---git-foss-syndicate-org-vhack-eu-nix-library_ref_prime = { + type = "git"; + url = "https://git.foss-syndicate.org/vhack.eu/nix-library"; + ref = "prime"; + rev = "65bf71bb6ef05ce684924a1dc248bb2e8e2869fb"; + revCount = 17; + lastModified = 1738443114; + narHash = "sha256-IV7n/l3rFoz5UuavrDv0a7IIOPne0jDQVmJAR8bve8U="; + }; + unflake_tarball_https---channels-nixos-org-nixos-26-05-nixexprs-tar-zst = { + type = "tarball"; + url = "https://releases.nixos.org/nixos/26.05/nixos-26.05.8045.b18a4b905f8d/nixexprs.tar.zst?lastModified=1787101114"; + rev = "b18a4b905f8d028dc4476412e6d6891728695379"; + lastModified = 1787101114; + narHash = "sha256-BA7sSNjLDuPGSOYBGpr6WQjke1MQ8AZpJ8GlYZM/mOc="; + }; + unflake_tarball_https---channels-nixos-org-nixos-unstable-nixexprs-tar-zst = { + type = "tarball"; + url = "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1057639.0ae2bc1419c3/nixexprs.tar.zst?lastModified=1787070829"; + rev = "0ae2bc1419c3f345984c2629e72e7a631820fa4d"; + lastModified = 1787070829; + narHash = "sha256-xe+M6F3syqECh9nH7Fmyxrjs13PtQV3S9o/EbutKz84="; + }; + unflake_github_nix-systems_default_ref_main_flake_false = unflake_github_nix-systems_default_ref_main; + unflake_github_nixos_flake-compat_flake_false = unflake_github_nixos_flake-compat; + }; + deps = indirect_deps // builtins.mapAttrs (_: spec: builtins.fetchTree spec) specs; injections = rec { unflake_github_cachix_pre-commit-hooks-nix = { flake-compat = "unflake_github_nixos_flake-compat_flake_false"; @@ -24,8 +24,7 @@ __update_sh_run() { unset __update_sh_command } -__update_sh_run unflake.sh --backend=npins -__update_sh_run npins update +__update_sh_run unflake.sh --backend=nix __update_sh_run ./pkgs/update_pkgs.sh "$@" # __update_sh_run nix flake check |
