Pass checks

This commit is contained in:
Daniel Flanagan 2024-07-24 13:20:06 -05:00
parent 58afc27d85
commit 4361355794
2 changed files with 39 additions and 38 deletions

View file

@ -76,10 +76,33 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1721042469,
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"pre-commit", "git-hooks",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -332,16 +355,16 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1718811006, "lastModified": 1720386169,
"narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=", "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "03d771e513ce90147b65fe922d87d3a0356fc125", "rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixos-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -410,39 +433,16 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1719259945,
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"git-hooks": "git-hooks",
"hardware": "hardware", "hardware": "hardware",
"helix": "helix", "helix": "helix",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"pre-commit": "pre-commit",
"slippi": "slippi", "slippi": "slippi",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }

View file

@ -10,8 +10,8 @@
sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable";
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs"; sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs";
pre-commit.url = "github:cachix/pre-commit-hooks.nix"; git-hooks.url = "github:cachix/git-hooks.nix";
pre-commit.inputs.nixpkgs.follows = "nixpkgs"; git-hooks.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
@ -51,7 +51,7 @@
nixpkgs-unstable, nixpkgs-unstable,
disko, disko,
sops-nix, sops-nix,
pre-commit, git-hooks,
home-manager, home-manager,
helix, helix,
hardware, hardware,
@ -93,29 +93,30 @@
templates = import ./templates; templates = import ./templates;
formatter = genPkgs (p: p.alejandra); formatter = genPkgs (p: p.alejandra);
checks = pkg ({system}: { checks = genPkgs ({system, ...}: {
pre-commit-check = pre-commit.lib.${system}.run { git-hooks = git-hooks.lib.${system}.run {
src = ./.; src = ./.;
hooks = { hooks = {
alejandra.enable = true; alejandra.enable = true;
}; };
}; };
}) {}; });
devShells = pkg ({ devShells = genPkgs ({
system, system,
pkgs, pkgs,
mkShell, mkShell,
...
}: { }: {
default = mkShell { default = mkShell {
inherit (outputs.checks.${system}.pre-commit-check) shellHook; inherit (outputs.checks.${system}.git-hooks) shellHook;
buildInputs = with pkgs; [ buildInputs = with pkgs; [
lua-language-server lua-language-server
nodePackages.bash-language-server nodePackages.bash-language-server
]; ];
}; };
}) {}; });
overlays = { overlays = {
# the default overlay composes all the other overlays together # the default overlay composes all the other overlays together