global justfile
This commit is contained in:
parent
09d1587e9f
commit
6dd1207628
3 changed files with 32 additions and 20 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
../system/base.nix
|
../system/base.nix
|
||||||
../system/packages.nix
|
../system/packages.nix
|
||||||
../system/shell.nix
|
../system/shell.nix
|
||||||
|
../system/justfile.nix
|
||||||
../system/home-manager-skel.nix
|
../system/home-manager-skel.nix
|
||||||
../system/fonts.nix
|
../system/fonts.nix
|
||||||
../system/printer.nix
|
../system/printer.nix
|
||||||
|
|
|
||||||
31
modules/system/justfile.nix
Normal file
31
modules/system/justfile.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
justfileText = ''
|
||||||
|
[no-cd]
|
||||||
|
manage:
|
||||||
|
$EDITOR ~/.config/home-manager/home.nix
|
||||||
|
|
||||||
|
[no-cd]
|
||||||
|
switch:
|
||||||
|
home-manager switch --flake ~/.config/home-manager#$USER
|
||||||
|
|
||||||
|
[no-cd]
|
||||||
|
rebuild:
|
||||||
|
sudo nixos-rebuild switch --flake "''${NIXOS_FLAKE:-/etc/nixos}#$HOSTNAME"
|
||||||
|
|
||||||
|
[no-cd]
|
||||||
|
clean:
|
||||||
|
nix-collect-garbage -d
|
||||||
|
|
||||||
|
[no-cd]
|
||||||
|
update:
|
||||||
|
sudo nix flake update --flake "''${NIXOS_FLAKE:-/etc/nixos}
|
||||||
|
just rebuild
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Global Just recipes (system-wide). Used when `XDG_CONFIG_DIRS` includes `/etc/xdg` (default).
|
||||||
|
environment.etc."xdg/just/justfile".text = justfileText;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -89,26 +89,6 @@
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.file = {
|
|
||||||
".justfile".text = ''
|
|
||||||
[no-cd]
|
|
||||||
manage:
|
|
||||||
$EDITOR ~/.config/home-manager/home.nix
|
|
||||||
|
|
||||||
[no-cd]
|
|
||||||
switch:
|
|
||||||
home-manager switch --flake ~/.config/home-manager#$USER
|
|
||||||
|
|
||||||
[no-cd]
|
|
||||||
rebuild:
|
|
||||||
sudo nixos-rebuild switch --flake "''${NIXOS_FLAKE:-/etc/nixos}#$HOSTNAME"
|
|
||||||
|
|
||||||
[no-cd]
|
|
||||||
clean:
|
|
||||||
nix-collect-garbage -d
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
# you can change the default terminal and editor here
|
# you can change the default terminal and editor here
|
||||||
TERMINAL = "${pkgs.ptyxis}/bin/ptyxis";
|
TERMINAL = "${pkgs.ptyxis}/bin/ptyxis";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue