diff --git a/modules/profile/nanuqsaurus.nix b/modules/profile/nanuqsaurus.nix index 3ade391..6088365 100644 --- a/modules/profile/nanuqsaurus.nix +++ b/modules/profile/nanuqsaurus.nix @@ -9,6 +9,7 @@ ../system/base.nix ../system/packages.nix ../system/shell.nix + ../system/justfile.nix ../system/home-manager-skel.nix ../system/fonts.nix ../system/printer.nix diff --git a/modules/system/justfile.nix b/modules/system/justfile.nix new file mode 100644 index 0000000..746e6ef --- /dev/null +++ b/modules/system/justfile.nix @@ -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; +} + diff --git a/templates/home-home.nix b/templates/home-home.nix index 55b89c4..ba2ec53 100644 --- a/templates/home-home.nix +++ b/templates/home-home.nix @@ -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 = { # you can change the default terminal and editor here TERMINAL = "${pkgs.ptyxis}/bin/ptyxis";