Refactor flake.nix
This commit is contained in:
parent
ef2f170462
commit
31ef819960
1 changed files with 65 additions and 61 deletions
26
flake.nix
26
flake.nix
|
@ -149,6 +149,10 @@
|
|||
"aarch64-linux"
|
||||
];
|
||||
|
||||
imports = [
|
||||
inputs.pre-commit-hooks.flakeModule
|
||||
];
|
||||
|
||||
flake = {
|
||||
lib = import ./lib inputs;
|
||||
|
||||
|
@ -201,11 +205,10 @@
|
|||
|
||||
};
|
||||
|
||||
perSystem = { self', pkgs, system, lib, ... }:
|
||||
{
|
||||
checks = {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
perSystem = { inputs', pkgs, config, ... }: {
|
||||
|
||||
pre-commit = {
|
||||
settings = {
|
||||
hooks = {
|
||||
nixpkgs-fmt.enable = true;
|
||||
deadnix.enable = true;
|
||||
|
@ -218,16 +221,13 @@
|
|||
shfmt.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
packages = {
|
||||
incus-ui = pkgs.callPackage ./pkgs/incus-ui { };
|
||||
};
|
||||
|
||||
devShells.default = with pkgs;
|
||||
mkShell {
|
||||
inherit (self'.checks.pre-commit-check) shellHook;
|
||||
devShells.default = with pkgs; mkShell {
|
||||
name = "dotfiles";
|
||||
packages = [
|
||||
pkgs.sops
|
||||
|
@ -251,16 +251,20 @@
|
|||
|
||||
cryptsetup
|
||||
|
||||
disko.packages.${system}.disko
|
||||
inputs'.disko.packages.disko
|
||||
|
||||
colmena
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
${config.pre-commit.installationScript}
|
||||
'';
|
||||
};
|
||||
|
||||
devShells.install = with pkgs; mkShell {
|
||||
name = "install";
|
||||
packages = [
|
||||
disko.packages.${system}.disko
|
||||
inputs'.disko.packages.disko
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue