flake: remove flake-utils #70

Open
llakala wants to merge 1 commit from llakala/nixos-module:no-flake-utils into main
First-time contributor

Less flake.lock bloat.

A few questions:

  • inputs and pkgs are both currently provided as flake inputs. Is that necessary? It seems a little silly.
  • Is there a specific formatter I should use?
Less `flake.lock` bloat. A few questions: - `inputs` and `pkgs` are both currently provided as flake inputs. Is that necessary? It seems a little silly. - Is there a specific formatter I should use?
Owner

We might in the future put the QA stuff into a separate directory like our flake-compat does. Otherwise this looks fine(tm), though I've not tested it yet.

We might in the future put the QA stuff into a separate directory like our flake-compat does. Otherwise this looks fine(tm), though I've not tested it yet.
jade left a comment
Owner

re-eval of nixpkgs when evaluating multiple attrs is not ideal, but fixing it is pretty easy.

re-eval of nixpkgs when evaluating multiple attrs is not ideal, but fixing it is pretty easy.
@ -15,0 +25,4 @@
"aarch64-linux"
];
forAllSystems = func:
Owner

it doesn't matter that much here but we probably should use a pattern that doesn't reevaluate nixpkgs for every usage. what i would advise is genAttrs outside this function to make an attrset pkgsFor, which you then access the pkgs for the system in. this means that you memoize the nixpkgs import. then this function is just f: mapAttrs (system: pkgs: f pkgs) pkgsFor

it doesn't matter *that* much here but we probably should use a pattern that doesn't reevaluate nixpkgs for every usage. what i would advise is genAttrs *outside* this function to make an attrset `pkgsFor`, which you then access the pkgs for the system in. this means that you memoize the nixpkgs import. then this function is just `f: mapAttrs (system: pkgs: f pkgs) pkgsFor`
@ -15,3 +38,4 @@
in
{
inherit inputs;
pkgs = forAllSystems (pkgs: pkgs);
Owner

that doesn't look right oh, okay, it's just funny looking. i guess you could use nixpkgs.lib.id here, but shrug.

~~that doesn't look right~~ oh, okay, it's just funny looking. i guess you could use nixpkgs.lib.id here, but shrug.
This pull request has changes conflicting with the target branch.
  • flake.nix
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u no-flake-utils:llakala-no-flake-utils
git switch llakala-no-flake-utils

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff llakala-no-flake-utils
git switch llakala-no-flake-utils
git rebase main
git switch main
git merge --ff-only llakala-no-flake-utils
git switch llakala-no-flake-utils
git rebase main
git switch main
git merge --no-ff llakala-no-flake-utils
git switch main
git merge --squash llakala-no-flake-utils
git switch main
git merge --ff-only llakala-no-flake-utils
git switch main
git merge llakala-no-flake-utils
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/nixos-module#70
No description provided.