2022-11-20 22:10:39 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
extraModulesPath,
|
|
|
|
inputs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit
|
|
|
|
(pkgs)
|
2022-08-13 19:50:23 +00:00
|
|
|
agenix
|
|
|
|
cachix
|
|
|
|
editorconfig-checker
|
|
|
|
mdbook
|
2022-08-23 22:53:38 +00:00
|
|
|
nix
|
2022-11-20 22:10:39 +00:00
|
|
|
alejandra
|
2022-08-13 19:50:23 +00:00
|
|
|
nvfetcher
|
2022-11-20 22:10:39 +00:00
|
|
|
shellcheck
|
|
|
|
shfmt
|
|
|
|
treefmt
|
|
|
|
;
|
|
|
|
|
|
|
|
inherit
|
|
|
|
(pkgs.nodePackages)
|
|
|
|
prettier
|
2022-08-13 19:50:23 +00:00
|
|
|
;
|
|
|
|
|
2021-07-21 04:36:41 +00:00
|
|
|
hooks = import ./hooks;
|
|
|
|
|
2022-11-20 22:10:39 +00:00
|
|
|
pkgWithCategory = category: package: {inherit package category;};
|
2022-08-13 19:50:23 +00:00
|
|
|
devos = pkgWithCategory "devos";
|
2021-07-21 04:36:41 +00:00
|
|
|
linter = pkgWithCategory "linter";
|
|
|
|
docs = pkgWithCategory "docs";
|
2022-11-20 22:10:39 +00:00
|
|
|
in {
|
2021-07-21 04:36:41 +00:00
|
|
|
_file = toString ./.;
|
|
|
|
|
2022-11-20 22:10:39 +00:00
|
|
|
imports = ["${extraModulesPath}/git/hooks.nix"];
|
|
|
|
git = {inherit hooks;};
|
2021-07-21 04:36:41 +00:00
|
|
|
|
2022-01-19 00:13:15 +00:00
|
|
|
# override for our own welcome
|
|
|
|
devshell.name = pkgs.lib.mkForce "PubSolarOS";
|
|
|
|
|
2023-01-28 21:05:30 +00:00
|
|
|
devshell.startup.aliases.text = ''
|
|
|
|
alias nvfetcher="nvfetcher --config $PRJ_ROOT/sources.toml --build-dir PRJ_ROOT/pkgs/_sources"
|
|
|
|
'';
|
|
|
|
|
2022-11-20 22:10:39 +00:00
|
|
|
commands = with pkgs;
|
|
|
|
[
|
|
|
|
(devos nix)
|
|
|
|
(devos agenix)
|
2023-01-28 21:05:30 +00:00
|
|
|
(devos nvfetcher)
|
2022-11-20 22:10:39 +00:00
|
|
|
(linter alejandra)
|
|
|
|
(linter editorconfig-checker)
|
|
|
|
(linter nodePackages.prettier)
|
|
|
|
(linter shfmt)
|
|
|
|
(linter shellcheck)
|
|
|
|
(linter treefmt)
|
2022-08-13 19:50:23 +00:00
|
|
|
|
2022-11-20 22:10:39 +00:00
|
|
|
(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)
|
|
|
|
];
|
2021-07-21 04:36:41 +00:00
|
|
|
}
|