os/shell/devos.nix

54 lines
1.2 KiB
Nix
Raw Normal View History

{ pkgs, extraModulesPath, inputs, lib, ... }:
let
inherit (pkgs)
agenix
cachix
editorconfig-checker
mdbook
nix
nixpkgs-fmt
nvfetcher
;
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; };
2022-01-19 00:13:15 +00:00
# override for our own welcome
devshell.name = pkgs.lib.mkForce "PubSolarOS";
commands = with pkgs; [
(devos nix)
(devos agenix)
{
category = "devos";
2022-08-09 09:54:19 +00:00
name = pkgs.nvfetcher.pname;
help = pkgs.nvfetcher.meta.description;
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher}/bin/nvfetcher -c ./sources.toml $@";
}
(linter nixpkgs-fmt)
(linter editorconfig-checker)
(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)
]
;
}