1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2025-07-04 21:16:23 +02:00
parent a41850db1b
commit 912e82c032
No known key found for this signature in database
4 changed files with 128 additions and 12 deletions

View file

@ -4,29 +4,61 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
flake-parts,
...
hooks,
treefmt,
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
imports = [
hooks.flakeModule
treefmt.flakeModule
];
flake.nixosModules.default = import ./module.nix self;
systems = nixpkgs.lib.systems.flakeExposed;
perSystem =
{
config,
pkgs,
...
}:
{
treefmt = {
projectRootFile = "flake.nix";
programs.nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
};
pre-commit.settings.hooks = {
treefmt.enable = true;
};
devShells.default = pkgs.mkShellNoCC {
shellHook = ''
${config.pre-commit.installationScript}
'';
};
packages.default = pkgs.callPackage ./package.nix { };
};
flake.nixosModules.default = import ./module.nix self;
};
}