Added nixfmt pre-commit-hook
This commit is contained in:
parent
bcf1fed099
commit
a4d6a5dd98
4 changed files with 122 additions and 60 deletions
33
flake.nix
33
flake.nix
|
|
@ -9,10 +9,6 @@
|
|||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager-stable = {
|
||||
url = "github:nix-community/home-manager/release-22.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
};
|
||||
|
||||
baduhai-nur.url = "github:baduhai/nur";
|
||||
|
||||
|
|
@ -45,11 +41,16 @@
|
|||
url = "github:baduhai/dotfiles";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
pre-commit-hooks = {
|
||||
url = "github:cachix/pre-commit-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, baduhai-nur, kmonad
|
||||
, nixpkgs-stable, home-manager-stable, deploy-rs, agenix, nixos-generators
|
||||
, homepage, dotfiles, ... }: {
|
||||
, nixpkgs-stable, deploy-rs, agenix, nixos-generators, homepage, dotfiles
|
||||
, pre-commit-hooks, ... }: {
|
||||
nixosConfigurations = {
|
||||
rotterdam = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
|
@ -100,17 +101,13 @@
|
|||
server = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./users/servers/user.nix
|
||||
];
|
||||
modules = [ ./users/servers/user.nix ];
|
||||
};
|
||||
|
||||
desktop = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./users/desktops/user.nix
|
||||
];
|
||||
modules = [ ./users/desktops/user.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -131,6 +128,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
checks.x86_64-linux = {
|
||||
pre-commit-check = pre-commit-hooks.lib."x86_64-linux".run {
|
||||
src = ./.;
|
||||
hooks = { nixfmt.enable = true; };
|
||||
};
|
||||
};
|
||||
|
||||
devShells.x86_64-linux.default =
|
||||
nixpkgs.legacyPackages."x86_64-linux".mkShell {
|
||||
inherit (self.checks."x86_64-linux".pre-commit-check) shellHook;
|
||||
};
|
||||
|
||||
nixosModules.qbittorrent = import ./modules/qbittorrent.nix;
|
||||
|
||||
packages.x86_64-linux = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue