apply treefmt

This commit is contained in:
Jörg Thalheim 2023-10-24 17:34:54 +02:00
parent 8c8bb60d41
commit 3a93a33363
2 changed files with 22 additions and 18 deletions

View File

@ -31,24 +31,26 @@
perSystem = { config, pkgs, ... }: { perSystem = { config, pkgs, ... }: {
treefmt = { treefmt = {
projectRootFile = "flake.nix"; projectRootFile = "flake.nix";
programs.terraform.enable = true; programs.hclfmt.enable = true;
programs.nixpkgs-fmt.enable = true; programs.nixpkgs-fmt.enable = true;
}; };
packages.default = let packages.default =
terraformHalal = pkgs.terraform.overrideAttrs (_old: { meta = _old.meta // { license = lib.licenses.free; }; }); let
in pkgs.mkShell { terraformHalal = pkgs.terraform.overrideAttrs (_old: { meta = _old.meta // { license = lib.licenses.free; }; });
packages = [ in
pkgs.bashInteractive pkgs.mkShell {
pkgs.sops packages = [
(terraformHalal.withPlugins (p: [ pkgs.bashInteractive
p.netlify pkgs.sops
p.hcloud (terraformHalal.withPlugins (p: [
p.null p.netlify
p.external p.hcloud
p.local p.null
])) p.external
]; p.local
}; ]))
];
};
}; };
}); });
} }

View File

@ -1,6 +1,8 @@
{ self, lib, ... }: let { self, lib, ... }:
let
nixosVars = builtins.fromJSON (builtins.readFile ./nixos-vars.json); nixosVars = builtins.fromJSON (builtins.readFile ./nixos-vars.json);
in { in
{
imports = [ imports = [
self.nixosModules.nixos-wiki self.nixosModules.nixos-wiki
self.nixosModules.nixos-wiki-backup self.nixosModules.nixos-wiki-backup