From f0ac3a7705060d6709998bde8d1c19c4316e364a Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sun, 5 Jan 2025 18:24:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=8C=20Nih-Helper=20and=20renamed=20reb?= =?UTF-8?q?uild=20to=20switch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configuration.nix | 2 +- nixHelper.nix | 9 +++++++++ rebuild => switch | 4 ++-- test | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 nixHelper.nix rename rebuild => switch (62%) diff --git a/configuration.nix b/configuration.nix index c3602aa..361610f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,6 +17,7 @@ ./hyprland ./audio.nix ./networking.nix + ./nixHelper.nix ./development.nix ./security.nix ./locale.nix @@ -43,7 +44,6 @@ nixpkgs.config.allowUnfree = true; environment.sessionVariables = { - FLAKE = "/etc/nixos"; # Tells Electron apps to use Wayland NIXOS_OZONE_WL = "1"; NIXOS_CONFIG_PATH = "/etc/nixos"; diff --git a/nixHelper.nix b/nixHelper.nix new file mode 100644 index 0000000..dca5fca --- /dev/null +++ b/nixHelper.nix @@ -0,0 +1,9 @@ +# Nix-Helper: swgithub.com/viperML/nh +{ ... }: + +{ + programs.nh = { + enable = true; + flake = ./.; + }; +} diff --git a/rebuild b/switch similarity index 62% rename from rebuild rename to switch index 72fa4e9..d200b2a 100755 --- a/rebuild +++ b/switch @@ -2,5 +2,5 @@ # Rebuild and switch the environment if successful git add . -sudo ./fmt -sudo nixos-rebuild switch --flake .# +./fmt +nh os switch . diff --git a/test b/test index 409a0d1..a8cc239 100755 --- a/test +++ b/test @@ -2,5 +2,5 @@ # Rebuild and switch the environment if successful git add . -sudo ./fmt -sudo nixos-rebuild test --flake .# +./fmt +nh os test .