Format
This commit is contained in:
parent
c47db92a88
commit
e7c56b4d22
27 changed files with 107 additions and 202 deletions
21
flake.nix
21
flake.nix
|
|
@ -6,7 +6,6 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:nix-community/disko";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
home-manager = {
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -41,7 +40,6 @@
|
|||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
nix-custom,
|
||||
pre-commit-hooks,
|
||||
|
|
@ -49,6 +47,7 @@
|
|||
}: let
|
||||
linuxCfgDir = ./linux;
|
||||
templateDir = ./template;
|
||||
eachSystem = nixpkgs.lib.genAttrs ["x86_64-linux"];
|
||||
in
|
||||
{
|
||||
nixosConfigurations =
|
||||
|
|
@ -59,6 +58,7 @@
|
|||
# Import config from folder
|
||||
(linuxCfgDir + "/${instance}")
|
||||
# Common setups
|
||||
./common
|
||||
({pkgs, ...}: {
|
||||
networking.hostName = instance;
|
||||
nixpkgs.overlays = [nix-custom.overlays.default];
|
||||
|
|
@ -75,21 +75,22 @@
|
|||
})
|
||||
(builtins.readDir templateDir);
|
||||
}
|
||||
// (
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
checks.pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
// {
|
||||
checks = eachSystem (system: {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks.alejandra.enable = true;
|
||||
};
|
||||
devShells.default = let
|
||||
});
|
||||
devShells = eachSystem (system: {
|
||||
default = let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pre-commit = self.checks.${system}.pre-commit-check;
|
||||
in
|
||||
pkgs.mkShell {
|
||||
inherit (pre-commit) shellHook;
|
||||
buildInputs = pre-commit.enabledPackages;
|
||||
};
|
||||
})
|
||||
);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue