mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2024-11-28 03:04:17 +01:00
0afcb72267
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
71 lines
1.9 KiB
Nix
71 lines
1.9 KiB
Nix
{
|
|
|
|
perSystem =
|
|
{ pkgs, ... }:
|
|
{
|
|
treefmt = {
|
|
projectRootFile = "flake.nix";
|
|
settings.global.excludes = [
|
|
"*/nixos-vars.json"
|
|
"*/secrets.yaml"
|
|
"*.lock"
|
|
".gitignore"
|
|
"modules/nixos-wiki/favicon.ico"
|
|
"modules/nixos-wiki/nixos.png"
|
|
"modules/nixos-wiki/robots.txt"
|
|
"oauth-permissions.png"
|
|
"targets/nixos-wiki.nixos.org/secrets/*"
|
|
];
|
|
programs.hclfmt.enable = true;
|
|
programs.nixpkgs-fmt.enable = true;
|
|
programs.deadnix.enable = true;
|
|
programs.ruff.format = true;
|
|
programs.ruff.check = true;
|
|
programs.shfmt.enable = true;
|
|
programs.yamlfmt.enable = true;
|
|
settings.formatter.shfmt.includes = [
|
|
"*.envrc"
|
|
"*.envrc.private-template"
|
|
];
|
|
programs.shellcheck.enable = true;
|
|
programs.deno.enable = true;
|
|
programs.black.enable = true;
|
|
};
|
|
packages = {
|
|
default = pkgs.mkShell {
|
|
packages =
|
|
let
|
|
convert2Tofu =
|
|
provider:
|
|
provider.override (prev: {
|
|
homepage = builtins.replaceStrings [ "registry.terraform.io/providers" ] [
|
|
"registry.opentofu.org"
|
|
]
|
|
prev.homepage;
|
|
});
|
|
in
|
|
[
|
|
pkgs.bashInteractive
|
|
pkgs.sops
|
|
(pkgs.opentofu.withPlugins (
|
|
p:
|
|
builtins.map convert2Tofu [
|
|
p.hcloud
|
|
p.null
|
|
p.external
|
|
p.local
|
|
]
|
|
))
|
|
];
|
|
};
|
|
}
|
|
// (import ./checks/linkcheck/pkgs { inherit pkgs; });
|
|
devShells.linkcheck = pkgs.mkShell {
|
|
packages = [
|
|
pkgs.lychee
|
|
(pkgs.python3.withPackages (pypkgs: [ pypkgs.lxml ]))
|
|
];
|
|
};
|
|
};
|
|
}
|