From c214a560f0500e4be077086e557c3e6d336c7c27 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 7 Jul 2025 16:03:51 -0700 Subject: move scripts managed by nix out of the flake In order to keep the flake readable, the various scripts managed by nix are now moved to their own files under `nix/scripts`. --- nix/scripts/linux.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 nix/scripts/linux.nix (limited to 'nix/scripts/linux.nix') diff --git a/nix/scripts/linux.nix b/nix/scripts/linux.nix new file mode 100644 index 0000000..b44c86f --- /dev/null +++ b/nix/scripts/linux.nix @@ -0,0 +1,19 @@ +{ + pkgs, +}: +[ + (pkgs.writeScriptBin "nbuild" '' + set -e + echo "> Running nixos-rebuild build..." + sudo nixos-rebuild build --flake . + echo "> nixos-rebuild build was successful ✅" + '') + + (pkgs.writeScriptBin "nswitch" '' + set -e + echo "> Running nixos-rebuild switch..." + sudo nixos-rebuild switch --flake . + echo "> nixos-rebuild switch was successful ✅" + echo "> NixOS config was successfully applied 🚀" + '') +] -- cgit v1.2.3