diff options
Diffstat (limited to '')
-rw-r--r-- | flake.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix index dc63ea9..c7af7b4 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,13 @@ library.url = "git+https://git.vhack.eu/vhack.eu/nix-library?ref=prime"; + treefmt-nix = { + url = "github:numtide/treefmt-nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + # inputs for following systems = { url = "github:nix-systems/x86_64-linux"; # only evaluate for this system @@ -76,6 +83,7 @@ nixpkgs, nixpkgs-unstable, library, + treefmt-nix, # modules simple-nixos-mailserver, impermanence, @@ -107,6 +115,7 @@ vhackPackages = import ./pkgs {inherit pkgs nixLib;}; inherit (library) nixLib; + treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;}; in { nixosConfigurations."server1" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -119,15 +128,17 @@ ]; }; - checks."${system}" = tests; + checks."${system}" = nixLib.warnMerge tests { + formatting = + treefmtEval.config.build.check self; + } "the flake checks"; packages."${system}" = vhackPackages; + formatter."${system}" = treefmtEval.config.build.wrapper; devShells."${system}" = { default = pkgs.mkShell { packages = with pkgs; [ - alejandra - # used for certificate generation in the taskserver setup gnutls @@ -138,6 +149,5 @@ ]; }; }; - formatter."${system}" = pkgs.alejandra; }; } |