mailnix/flake.nix
2024-11-26 00:23:32 +01:00

49 lines
1 KiB
Nix

{
description = "An opinionated Nixos Mailsystem";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
pre-commit-hooks-nix.url = "github:cachix/git-hooks.nix";
pre-commit-hooks-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = [
"x86_64-linux"
"aarch64-linux"
];
imports = [
inputs.pre-commit-hooks-nix.flakeModule
];
perSystem = {
config,
self',
inputs',
pkgs,
system,
...
}: {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
alejandra
];
shellHook = ''
${config.pre-commit.installationScript}
'';
};
pre-commit.settings.hooks = {
alejandra.enable = true;
};
};
};
}