init flake-utils

This commit is contained in:
cy 2025-01-13 01:34:20 -05:00
parent b6c18ce5f2
commit 4cded3c746
3 changed files with 48 additions and 14 deletions

42
flake.lock generated
View file

@ -139,6 +139,24 @@
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
@ -153,9 +171,9 @@
"type": "github"
}
},
"flake-utils_2": {
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
@ -315,7 +333,7 @@
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
],
@ -452,7 +470,7 @@
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
@ -503,6 +521,7 @@
"root": {
"inputs": {
"disko": "disko",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs",
@ -588,6 +607,21 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt": {
"inputs": {
"nixpkgs": [

View file

@ -27,6 +27,7 @@
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
nixpkgs-btrbk.url = "github:cything/nixpkgs/btrbk"; # unmerged PR
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
@ -53,20 +54,19 @@
home-manager,
treefmt,
disko,
flake-utils,
...
}@inputs:
let
lib = nixpkgs.lib;
inherit (self) outputs;
systems = [ "x86_64-linux" ];
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
overlays = [
# (overlayPkgsFromFlake inputs.eza [
# ])
] ++ import ./overlay;
pkgsFor = lib.genAttrs systems (
pkgsFor = flake-utils.lib.eachDefaultSystem (
system:
import nixpkgs {
inherit system overlays;
@ -76,9 +76,9 @@
}
);
treefmtEval = forEachSystem (
pkgs:
treefmt.lib.evalModule pkgs {
treefmtEval = flake-utils.lib.eachDefaultSystem (
system:
treefmt.lib.evalModule pkgsFor.system {
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
programs.stylua.enable = true;
@ -92,9 +92,9 @@
);
in
{
formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
checks = forEachSystem (pkgs: {
formatting = treefmtEval.${pkgs.system}.config.build.check self;
formatter = flake-utils.lib.eachDefaultSystem (system: treefmtEval.${system}.config.build.wrapper);
checks = flake-utils.lib.eachDefaultSystem (system: {
formatting = treefmtEval.${system}.config.build.check self;
});
# lets us build overlaid packages with `nix build .#<package>`
packages = pkgsFor;

View file

@ -147,7 +147,7 @@
servers = {
bashls.enable = true;
lua_ls.enable = true;
nil_ls.enable = true;
nixd.enable = true;
rust_analyzer = {
enable = true;
installRustc = true;