2021-11-30 00:38:56 +00:00
|
|
|
{ pkgs, extraModulesPath, inputs, ... }:
|
2021-07-21 04:36:41 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
hooks = import ./hooks;
|
|
|
|
|
|
|
|
pkgWithCategory = category: package: { inherit package category; };
|
|
|
|
linter = pkgWithCategory "linter";
|
|
|
|
docs = pkgWithCategory "docs";
|
|
|
|
devos = pkgWithCategory "devos";
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
_file = toString ./.;
|
|
|
|
|
|
|
|
imports = [ "${extraModulesPath}/git/hooks.nix" ];
|
|
|
|
git = { inherit hooks; };
|
|
|
|
|
2022-01-19 00:13:15 +00:00
|
|
|
# override for our own welcome
|
|
|
|
devshell.name = pkgs.lib.mkForce "PubSolarOS";
|
|
|
|
|
2021-07-21 04:36:41 +00:00
|
|
|
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123
|
|
|
|
devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry ''
|
|
|
|
# PATH is devshell's exorbitant privilige:
|
|
|
|
# fence against its pollution
|
|
|
|
_PATH=''${PATH}
|
|
|
|
# Load installed profiles
|
|
|
|
for file in "$DEVSHELL_DIR/etc/profile.d/"*.sh; do
|
|
|
|
# If that folder doesn't exist, bash loves to return the whole glob
|
|
|
|
[[ -f "$file" ]] && source "$file"
|
|
|
|
done
|
|
|
|
# Exert exorbitant privilige and leave no trace
|
|
|
|
export PATH=''${_PATH}
|
|
|
|
unset _PATH
|
|
|
|
'');
|
|
|
|
|
|
|
|
commands = with pkgs; [
|
2022-01-19 00:13:15 +00:00
|
|
|
(devos nixFlakes)
|
2021-07-21 04:36:41 +00:00
|
|
|
(devos agenix)
|
|
|
|
{
|
|
|
|
category = "devos";
|
|
|
|
name = pkgs.nvfetcher-bin.pname;
|
|
|
|
help = pkgs.nvfetcher-bin.meta.description;
|
2021-09-29 18:49:43 +00:00
|
|
|
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
|
2021-07-21 04:36:41 +00:00
|
|
|
}
|
|
|
|
(linter nixpkgs-fmt)
|
|
|
|
(linter editorconfig-checker)
|
|
|
|
# (docs python3Packages.grip) too many deps
|
|
|
|
(docs mdbook)
|
2021-11-30 00:38:56 +00:00
|
|
|
(devos inputs.deploy.packages.${pkgs.system}.deploy-rs)
|
2021-07-21 04:36:41 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
++ lib.optional
|
|
|
|
(system != "i686-linux")
|
|
|
|
(devos cachix)
|
|
|
|
|
|
|
|
;
|
|
|
|
}
|