repo: init
This commit is contained in:
commit
8dd5ce867a
6 changed files with 274 additions and 0 deletions
61
flake.nix
Normal file
61
flake.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
description = "Alqueva is the largest lake in Portugal.";
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
type = "github";
|
||||
owner = "nixos";
|
||||
repo = "nixpkgs";
|
||||
ref = "nixos-unstable";
|
||||
};
|
||||
flake-parts = {
|
||||
type = "github";
|
||||
owner = "hercules-ci";
|
||||
repo = "flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
git-hooks-nix = {
|
||||
type = "github";
|
||||
owner = "cachix";
|
||||
repo = "git-hooks.nix";
|
||||
};
|
||||
};
|
||||
outputs = inputs @ {
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
...
|
||||
}: let
|
||||
lib = nixpkgs.lib.extend (import ./lib {inherit inputs;});
|
||||
in
|
||||
flake-parts.lib.mkFlake {
|
||||
inherit inputs;
|
||||
specialArgs = {inherit lib;};
|
||||
} {
|
||||
systems = ["x86_64-linux"];
|
||||
imports = [
|
||||
./computers
|
||||
inputs.git-hooks-nix.flakeModule
|
||||
];
|
||||
perSystem = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
pre-commit = {
|
||||
check.enable = true;
|
||||
settings.hooks = {
|
||||
alejandra.enable = true;
|
||||
deadnix = {
|
||||
enable = true;
|
||||
args = ["-e"];
|
||||
};
|
||||
statix = {
|
||||
enable = true;
|
||||
args = ["fix"];
|
||||
};
|
||||
};
|
||||
};
|
||||
devShells.default = config.pre-commit.devShell;
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue