pub-solar-os/shell/devos.nix
teutat3s 1a4ab1a93f fix/upstreaming-merge-conflicts (#41)
Co-authored-by: Anton <fetsorn@gmail.com>
Co-authored-by: Chris Montgomery <chris@cdom.io>
Co-authored-by: Timothy DeHerrera <tim.deh@pm.me>
Co-authored-by: Parthiv Seetharaman <pachum99@myrdd.info>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Co-authored-by: GTrunSec <gtrunsec@hardenedlinux.org>
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/41
Co-authored-by: teutat3s <teutates@mailbox.org>
Co-committed-by: teutat3s <teutates@mailbox.org>
2021-10-11 22:11:36 +00:00

62 lines
1.5 KiB
Nix

{ pkgs, extraModulesPath, ... }:
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; };
# 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
'');
packages = with pkgs; [
git-crypt
];
commands = with pkgs; [
(devos nixUnstable)
(devos agenix)
{
category = "devos";
name = pkgs.nvfetcher-bin.pname;
help = pkgs.nvfetcher-bin.meta.description;
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
}
(linter nixpkgs-fmt)
(linter editorconfig-checker)
# (docs python3Packages.grip) too many deps
(docs mdbook)
]
++ lib.optional
(pkgs ? deploy-rs)
(devos deploy-rs.deploy-rs)
++ lib.optional
(system != "i686-linux")
(devos cachix)
;
}