Update shells a bit
This commit is contained in:
parent
1414da9c00
commit
57f21d8d0d
8 changed files with 98 additions and 85 deletions
|
@ -1,10 +1,23 @@
|
|||
{ pkgs, inputs }: pkgs.devshell.mkShell {
|
||||
name = "NixOS config";
|
||||
commands = [
|
||||
{
|
||||
name = "format-all";
|
||||
category = "general commands";
|
||||
help = "Format all nix files in the project";
|
||||
command = "find $PRJ_ROOT -type f -name '*.nix' -print0 | xargs -0 nixpkgs-fmt";
|
||||
}
|
||||
{
|
||||
name = "fetchpatch";
|
||||
category = "general commands";
|
||||
help = "Fetch a patch from a nixpkgs PR by its ID";
|
||||
command = "curl -L https://github.com/NixOS/nixpkgs/pull/$1.patch -o $PRJ_ROOT/patches/$1.patch";
|
||||
}
|
||||
];
|
||||
packages = [
|
||||
pkgs.agenix
|
||||
# Use nixos-rebuild from flake, since it might be patched
|
||||
pkgs.nixos-rebuild
|
||||
pkgs.nixpkgs-fmt
|
||||
(pkgs.writeShellScriptBin "fetchpatch" "curl -L https://github.com/NixOS/nixpkgs/pull/$1.patch -o patches/$1.patch")
|
||||
inputs.agenix.packages.${pkgs.system}.default
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue