Change to flake-parts instead of flake-utils

This commit is contained in:
Greg Hellings
2024-10-03 09:45:45 -05:00
parent 755e5ea4ba
commit 805bf79ef6
2 changed files with 209 additions and 124 deletions
Generated
+170 -82
View File
@@ -193,36 +193,22 @@
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57, "type": "github"
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "owner": "edolstra",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" "repo": "flake-compat",
"type": "github"
} }
}, },
"flake-compat_2": { "flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
@@ -236,7 +222,7 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
} }
}, },
"flake-compat_4": { "flake-compat_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@@ -252,6 +238,20 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_5": { "flake-compat_5": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -269,6 +269,22 @@
} }
}, },
"flake-compat_6": { "flake-compat_6": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_7": {
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
@@ -284,6 +300,24 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixvimstable", "nixvimstable",
@@ -304,7 +338,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": { "flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixvimunstable", "nixvimunstable",
@@ -347,24 +381,6 @@
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_3"
}, },
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
@@ -379,9 +395,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_5" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@@ -397,9 +413,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_5": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_6" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1726560853,
@@ -417,8 +433,8 @@
}, },
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_3",
"gitignore": "gitignore", "gitignore": "gitignore_2",
"nixpkgs": [ "nixpkgs": [
"nixvimstable", "nixvimstable",
"nixpkgs" "nixpkgs"
@@ -448,7 +464,7 @@
"nixvimunstable", "nixvimunstable",
"flake-compat" "flake-compat"
], ],
"gitignore": "gitignore_2", "gitignore": "gitignore_3",
"nixpkgs": [ "nixpkgs": [
"nixvimunstable", "nixvimunstable",
"nixpkgs" "nixpkgs"
@@ -473,6 +489,27 @@
} }
}, },
"gitignore": { "gitignore": {
"inputs": {
"nixpkgs": [
"hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvimstable", "nixvimstable",
@@ -494,7 +531,7 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_2": { "gitignore_3": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvimunstable", "nixvimunstable",
@@ -622,6 +659,27 @@
"type": "github" "type": "github"
} }
}, },
"hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1727854478,
"narHash": "sha256-/odH2nUMAwkMgOS2nG2z0exLQNJS4S2LfMW0teqU7co=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "5f58871c9657b5fc0a7f65670fe2ba99c26c1d79",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"nix-darwin": { "nix-darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -696,6 +754,34 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1727825735,
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1720386169,
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1723221148, "lastModified": 1723221148,
@@ -713,6 +799,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1719082008,
"narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9693852a2070b398ee123a329e68f0dab5526681",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1725001927, "lastModified": 1725001927,
"narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=", "narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=",
@@ -728,7 +830,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1727634051, "lastModified": 1727634051,
"narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=",
@@ -744,7 +846,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1713805509, "lastModified": 1713805509,
"narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=", "narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=",
@@ -760,7 +862,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1726463316, "lastModified": 1726463316,
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=", "narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
@@ -811,12 +913,12 @@
"nixvimstable": { "nixvimstable": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
@@ -837,12 +939,12 @@
"nixvimunstable": { "nixvimunstable": {
"inputs": { "inputs": {
"devshell": "devshell_2", "devshell": "devshell_2",
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_4",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"git-hooks": "git-hooks_2", "git-hooks": "git-hooks_2",
"home-manager": "home-manager_3", "home-manager": "home-manager_3",
"nix-darwin": "nix-darwin_2", "nix-darwin": "nix-darwin_2",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"nuschtosSearch": "nuschtosSearch", "nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
@@ -878,7 +980,7 @@
}, },
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixvimunstable", "nixvimunstable",
"nixpkgs" "nixpkgs"
@@ -903,9 +1005,10 @@
"agenix": "agenix", "agenix": "agenix",
"btc": "btc", "btc": "btc",
"darwin": "darwin_2", "darwin": "darwin_2",
"flake-utils": "flake-utils_2", "flake-parts": "flake-parts",
"hm": "hm", "hm": "hm",
"hmunstable": "hmunstable", "hmunstable": "hmunstable",
"hooks": "hooks",
"nix23_05": "nix23_05", "nix23_05": "nix23_05",
"nixstable": "nixstable", "nixstable": "nixstable",
"nixunstable": "nixunstable", "nixunstable": "nixunstable",
@@ -1009,21 +1112,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1068,9 +1156,9 @@
}, },
"vsext": { "vsext": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_5",
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1727833615, "lastModified": 1727833615,
@@ -1088,8 +1176,8 @@
}, },
"wsl": { "wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_5", "flake-compat": "flake-compat_6",
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_4",
"nixpkgs": [ "nixpkgs": [
"nixunstable" "nixunstable"
] ]
@@ -1112,8 +1200,8 @@
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"fenix": "fenix", "fenix": "fenix",
"flake-compat": "flake-compat_6", "flake-compat": "flake-compat_7",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1727792524, "lastModified": 1727792524,
+39 -42
View File
@@ -16,7 +16,8 @@
url = "github:lnl7/nix-darwin/master"; url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixunstable"; inputs.nixpkgs.follows = "nixunstable";
}; };
flake-utils.url = "github:numtide/flake-utils"; flake-parts.url = "github:hercules-ci/flake-parts";
hooks.url = "github:cachix/git-hooks.nix";
hm = { hm = {
url = "github:nix-community/home-manager/release-24.05"; url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixstable"; inputs.nixpkgs.follows = "nixstable";
@@ -39,26 +40,18 @@
zed.url = "github:zed-industries/zed/v0.154.x"; zed.url = "github:zed-industries/zed/v0.154.x";
}; };
outputs = { outputs = { self, ...}@inputs: let
agenix,
flake-utils,
nixunstable,
nurpkgs,
vsext,
self,
...}@inputs:
let
local_overlay = import ./overlays; local_overlay = import ./overlays;
overlays = [ overlays = [
agenix.overlays.default inputs.agenix.overlays.default
local_overlay local_overlay
nurpkgs.overlay inputs.nurpkgs.overlay
vsext.overlays.default inputs.vsext.overlays.default
(_: _: { zed-editor = inputs.zed.packages.x86_64-linux.default; } ) (_: _: { zed-editor = inputs.zed.packages.x86_64-linux.default; } )
]; ];
in { in inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
#checks = { #checks = {
# x86_64-linux = { # x86_64-linux = {
# unstable = self.nixosConfigurations.jude.config.system.build.toplevel; # unstable = self.nixosConfigurations.jude.config.system.build.toplevel;
@@ -69,40 +62,44 @@
# }; # };
#}; #};
nixosConfigurations = (import ./hosts { inherit inputs overlays; }); flake = {
nixosConfigurations = (import ./hosts { inherit inputs overlays; });
darwinConfigurations = (import ./darwin { inherit inputs overlays; }); darwinConfigurations = (import ./darwin { inherit inputs overlays; });
homeConfigurations = (import ./home { inherit inputs overlays; }); homeConfigurations = (import ./home { inherit inputs overlays; });
devShells = (flake-utils.lib.eachSystemMap flake-utils.lib.allSystems (system: let overlays = {
pkgs = import nixunstable { inherit system overlays; }; default = local_overlay;
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
bashInteractive
curl
git
gnutar
gzip
inject
inject-darwin
tmux
vim
xonsh
];
}; };
}));
overlays = { modules = import ./modules;
default = local_overlay;
}; };
modules = import ./modules; perSystem = { config, self', pkgs', system, ... }: {
_module.args.pkgs = import inputs.nixpkgs {
packages = { inherit system overlays;
x86_64-linux = rec { };
default = iso-beta;
devShells = {
default = pkgs'.mkShell {
buildInputs = with pkgs'; [
bashInteractive
curl
git
gnutar
gzip
inject
inject-darwin
tmux
vim
xonsh
];
};
};
packages = rec {
defaullt = iso;
iso = self.nixosConfigurations.iso.config.system.build.isoImage; iso = self.nixosConfigurations.iso.config.system.build.isoImage;
iso-beta = self.nixosConfigurations.iso-beta.config.system.build.isoImage; iso-beta = self.nixosConfigurations.iso-beta.config.system.build.isoImage;
}; };