os/shell/devos.nix
teutat3s 7715a89401
Fix deploy-rs, use flake binary again
Can be reverted once deploy-rs nixpkgs binary is up-to-date
See: https://github.com/serokell/deploy-rs/issues/232
2023-09-15 12:13:47 +02:00

65 lines
1.3 KiB
Nix

{
pkgs,
extraModulesPath,
inputs,
lib,
...
}: let
inherit
(pkgs)
agenix
alejandra
cachix
editorconfig-checker
nix
nodePackages
nvfetcher
shellcheck
shfmt
treefmt
nixos-generators
;
inherit
(pkgs.nodePackages)
prettier
;
pkgWithCategory = category: package: {inherit package category;};
devos = pkgWithCategory "devos";
formatter = pkgWithCategory "linter";
in {
imports = ["${extraModulesPath}/git/hooks.nix" ./hooks];
# override for our own welcome
devshell.name = pkgs.lib.mkForce "PubSolarOS";
packages = [
alejandra
editorconfig-checker
nodePackages.prettier
shellcheck
shfmt
];
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 $@";
}
(formatter treefmt)
]
++ lib.optionals (!pkgs.stdenv.buildPlatform.isi686) [
(devos cachix)
]
++ lib.optionals (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin) [
(devos nixos-generators)
(devos inputs.deploy.packages.${pkgs.system}.deploy-rs)
];
}