refactor(nix): move style app wiring into dotfiles
This commit is contained in:
42
flake.nix
42
flake.nix
@@ -75,42 +75,10 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
treefmt-nix,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||
nixStyleCheck = pkgs.writeShellApplication {
|
||||
name = "nix-style-check";
|
||||
runtimeInputs = [
|
||||
treefmtEval.config.build.wrapper
|
||||
pkgs.statix
|
||||
pkgs.deadnix
|
||||
];
|
||||
text = ''
|
||||
treefmt --fail-on-change
|
||||
statix check .
|
||||
deadnix --fail --no-lambda-pattern-names --no-underscore .
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
formatter.${system} = treefmtEval.config.build.wrapper;
|
||||
|
||||
apps.${system}.nix-style-check = {
|
||||
type = "app";
|
||||
program = "${nixStyleCheck}/bin/nix-style-check";
|
||||
};
|
||||
|
||||
nixosConfigurations = (import ./src/dotfiles {
|
||||
inherit inputs self;
|
||||
lib = nixpkgs.lib;
|
||||
root = ./configs/nixos;
|
||||
}).nixosConfigurations;
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
import ./src/dotfiles {
|
||||
inherit inputs self;
|
||||
lib = nixpkgs.lib;
|
||||
root = ./configs/nixos;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user