forked from pub-solar/os
teutat3s
24b8b9f060
Use treefmt For context, see upstream PR: https://github.com/divnix/digga/pull/491
68 lines
1.4 KiB
Nix
68 lines
1.4 KiB
Nix
{
|
|
pkgs,
|
|
extraModulesPath,
|
|
inputs,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit
|
|
(pkgs)
|
|
agenix
|
|
cachix
|
|
editorconfig-checker
|
|
mdbook
|
|
nix
|
|
alejandra
|
|
nvfetcher
|
|
shellcheck
|
|
shfmt
|
|
treefmt
|
|
;
|
|
|
|
inherit
|
|
(pkgs.nodePackages)
|
|
prettier
|
|
;
|
|
|
|
hooks = import ./hooks;
|
|
|
|
pkgWithCategory = category: package: {inherit package category;};
|
|
devos = pkgWithCategory "devos";
|
|
linter = pkgWithCategory "linter";
|
|
docs = pkgWithCategory "docs";
|
|
in {
|
|
_file = toString ./.;
|
|
|
|
imports = ["${extraModulesPath}/git/hooks.nix"];
|
|
git = {inherit hooks;};
|
|
|
|
# override for our own welcome
|
|
devshell.name = pkgs.lib.mkForce "PubSolarOS";
|
|
|
|
commands = with pkgs; [
|
|
(devos nix)
|
|
(devos agenix)
|
|
{
|
|
category = "devos";
|
|
name = pkgs.nvfetcher.pname;
|
|
help = pkgs.nvfetcher.meta.description;
|
|
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher}/bin/nvfetcher -c ./sources.toml $@";
|
|
}
|
|
(linter alejandra)
|
|
(linter editorconfig-checker)
|
|
(linter nodePackages.prettier)
|
|
(linter shfmt)
|
|
(linter shellcheck)
|
|
(linter treefmt)
|
|
|
|
(docs mdbook)
|
|
]
|
|
++ lib.optionals (!pkgs.stdenv.buildPlatform.isi686) [
|
|
(devos cachix)
|
|
]
|
|
++ lib.optionals (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin) [
|
|
(devos inputs.nixos-generators.defaultPackage.${pkgs.system})
|
|
(devos deploy-rs)
|
|
];
|
|
}
|