2024-02-28 09:31:58 -06:00
|
|
|
{
|
2024-03-19 10:25:29 -05:00
|
|
|
inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
2024-02-28 09:31:58 -06:00
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
pre-commit-hooks,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (self) outputs;
|
|
|
|
|
2024-03-19 10:25:29 -05:00
|
|
|
supportedSystems = [
|
2024-02-28 09:31:58 -06:00
|
|
|
"aarch64-linux"
|
2024-03-19 10:25:29 -05:00
|
|
|
"x86_64-linux"
|
|
|
|
|
2024-02-28 09:31:58 -06:00
|
|
|
"aarch64-darwin"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
|
|
|
|
2024-03-19 10:25:29 -05:00
|
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
2024-02-28 09:31:58 -06:00
|
|
|
in {
|
|
|
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
|
|
|
|
|
|
checks = forAllSystems (system: {
|
|
|
|
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
|
|
|
src = ./.;
|
|
|
|
hooks = {
|
|
|
|
alejandra.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
devShell = forAllSystems (system: let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in
|
|
|
|
pkgs.mkShell {
|
2024-02-28 10:12:31 -06:00
|
|
|
buildInputs = with pkgs; [nil alejandra];
|
2024-02-28 09:31:58 -06:00
|
|
|
inherit (outputs.checks.${system}.pre-commit-check) shellHook;
|
|
|
|
});
|
|
|
|
|
|
|
|
# packages = forAllSystems (system: import ./pkgs {pkgs = nixpkgs.legacyPackages.${system};});
|
|
|
|
# overlays = import ./overlays self;
|
|
|
|
# nixosModules = import ./modules/nixos;
|
|
|
|
# homeManagerModules = import ./modules/home-manager;
|
|
|
|
# nixosConfigurations = import ./nixos;
|
|
|
|
# homeConfigurations = import ./home
|
|
|
|
# templates = import ./templates;
|
|
|
|
};
|
|
|
|
}
|