even better flake-utils replacement thanks frozeninfate

This commit is contained in:
Gerg-L 2023-05-07 22:59:49 -04:00
parent 7ee7675019
commit a3e18f9a36
2 changed files with 16 additions and 26 deletions

18
flake.lock generated
View file

@ -27,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1683510454, "lastModified": 1683514650,
"narHash": "sha256-9MMlAdZdfqakRpgA4S18q/3kp66Ydh7c+LWBiq3F3+c=", "narHash": "sha256-iEqDoxDmUMINqUX0BZz5HNaKL4oxdG4j4ug+sXq/3Nk=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "fetch-rs", "repo": "fetch-rs",
"rev": "89ea40a98ffcd8d6d7ae29514dad751ca2902a16", "rev": "95c1568e6ba77afe624ca84ecae4a502d5ef06b5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -261,11 +261,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1683510496, "lastModified": 1683514625,
"narHash": "sha256-lZ4wm+IM/C5+XyP/iN/bqjwPvoHtlz8TS3oc2UjvpbE=", "narHash": "sha256-l+nJVswlUuDb0ZeHaqDMUf3tfcoND/ukgDkDQuLcpmw=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "nvim-flake", "repo": "nvim-flake",
"rev": "03338835c3615b2ded7cc5478d59b22db4521f56", "rev": "63b85335e2a617a49489a1e3c28bd40014d305f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -354,11 +354,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1683510562, "lastModified": 1683514663,
"narHash": "sha256-BXWVMN1kIGXyTZnxrMPFtKOxKx6JHBFFd4wP7SHcOEs=", "narHash": "sha256-9NbnzTXKo8WbLWg9U72UuAyYDCJJg6D7wJYr0C2Q/+I=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "suckless", "repo": "suckless",
"rev": "a32c7af88b906f60db4cf3191a20634c7d183ef9", "rev": "08da0823cb1f835cf1ee0bac90bb909f02f876d6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -70,20 +70,10 @@
name: (import (self + "/systems/" + name + "/disko.nix") inputs) name: (import (self + "/systems/" + name + "/disko.nix") inputs)
); );
withSystem = attrSet: let withSystem = f:
f = attrPath: lib.foldAttrs lib.mergeAttrs {}
lib.zipAttrsWith ( (map (s: lib.mapAttrs (_: v: {${s} = v;}) (f s))
n: values: ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]);
if lib.tail values == []
then lib.head values
else if lib.all lib.isList values
then lib.unique (lib.concatLists values)
else if lib.all lib.isAttrs values
then f (attrPath ++ [n]) values
else lib.last values
);
in
f [] (map (system: attrSet system) ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]);
in in
{ {
nixosConfigurations = nixosConfigurations =
@ -106,9 +96,9 @@
system: let system: let
pkgs = unstable.legacyPackages.${system}; pkgs = unstable.legacyPackages.${system};
in { in {
formatter.${system} = pkgs.alejandra; formatter = pkgs.alejandra;
devShells.${system}.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
packages = [ packages = [
pkgs.sops pkgs.sops
pkgs.nil pkgs.nil
@ -118,7 +108,7 @@
]; ];
}; };
packages.${system} = packages =
{ {
nixos-iso = nixos-generators.nixosGenerate { nixos-iso = nixos-generators.nixosGenerate {
inherit system; inherit system;