mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
pre-format
This commit is contained in:
parent
3ad599c6aa
commit
de7683556e
21 changed files with 462 additions and 403 deletions
27
flake.nix
27
flake.nix
|
|
@ -5,7 +5,10 @@
|
|||
unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||
stable.url = "github:NixOS/nixpkgs?ref=nixos-23.05";
|
||||
|
||||
nix.url = "github:NixOS/nix?ref=3a62651bd663a849a568bf69017d0f3b1addd564";
|
||||
nix = {
|
||||
url = "github:NixOS/nix?ref=2.17-maintenance";
|
||||
inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
|
|
@ -19,6 +22,10 @@
|
|||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
nixfmt = {
|
||||
url = "github:piegamesde/nixfmt?ref=rfc101-style";
|
||||
inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
spicetify-nix = {
|
||||
url = "github:Gerg-L/spicetify-nix";
|
||||
inputs.nixpkgs.follows = "unstable";
|
||||
|
|
@ -69,7 +76,23 @@
|
|||
"game-laptop"
|
||||
"moms-laptop"
|
||||
];
|
||||
formatter.${system} = pkgs.alejandra;
|
||||
formatter.${system} = pkgs.writeShellApplication {
|
||||
name = "lint";
|
||||
runtimeInputs = [
|
||||
(pkgs.nixfmt.overrideAttrs {
|
||||
version = "0.6.0-${inputs.nixfmt.shortRev}";
|
||||
|
||||
src = inputs.nixfmt;
|
||||
})
|
||||
pkgs.deadnix
|
||||
pkgs.statix
|
||||
pkgs.fd
|
||||
];
|
||||
text = ''
|
||||
fd '.*\.nix' . -x statix fix -- {} \;
|
||||
fd '.*\.nix' . -X deadnix -e -- {} \; -X nixfmt {} \;
|
||||
'';
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue