mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 12:51:34 +01:00
Replace shell aliases with justfile recipes for managing nix commands
This commit is contained in:
parent
8d8c006e99
commit
ad7ae417b9
4 changed files with 30 additions and 13 deletions
|
|
@ -6,8 +6,11 @@
|
|||
formatter =
|
||||
(inputs.treefmt-nix.lib.evalModule pkgs {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
programs.prettier.enable = true;
|
||||
programs = {
|
||||
nixfmt.enable = true;
|
||||
prettier.enable = true;
|
||||
just.enable = true;
|
||||
};
|
||||
}).config.build.wrapper;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
24
justfile
Normal file
24
justfile
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
set quiet := true
|
||||
|
||||
rebuild := "sudo -v && nh os"
|
||||
|
||||
default:
|
||||
just --list --unsorted
|
||||
|
||||
switch:
|
||||
{{ rebuild }} switch
|
||||
|
||||
test:
|
||||
{{ rebuild }} test
|
||||
|
||||
boot:
|
||||
{{ rebuild }} boot
|
||||
|
||||
reboot: boot
|
||||
reboot
|
||||
|
||||
update:
|
||||
nix flake update
|
||||
|
||||
fmt:
|
||||
nix fmt
|
||||
|
|
@ -5,16 +5,5 @@
|
|||
config = lib.mkIf config.myConfig.nix-helper.enable {
|
||||
environment.sessionVariables.FLAKE = "/home/seb/Projects/nixos/my-config";
|
||||
programs.nh.enable = true;
|
||||
|
||||
environment.shellAliases =
|
||||
let
|
||||
rebuild = "sudo -v && nh os";
|
||||
in
|
||||
{
|
||||
nrs = "${rebuild} switch";
|
||||
nrt = "${rebuild} test";
|
||||
nrb = "${rebuild} boot";
|
||||
nrrb = "nrb && reboot";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
home.packages = [
|
||||
pkgs.fastfetch
|
||||
pkgs.just
|
||||
|
||||
pkgs.cinnamon.nemo-with-extensions
|
||||
pkgs.jetbrains.idea-community
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue