From 7c105b7d3348515f637ce58d8bf6b860deafe7d6 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Wed, 29 May 2024 16:57:25 +0200 Subject: [PATCH] Include env variable and aliases in nh configuration --- hosts/inspiron/default.nix | 2 -- hosts/north/default.nix | 2 -- modules/home/shell/aliases.nix | 12 ------------ modules/system/nix-helper.nix | 12 ++++++++++++ 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/hosts/inspiron/default.nix b/hosts/inspiron/default.nix index 62dbf27..2bafe66 100644 --- a/hosts/inspiron/default.nix +++ b/hosts/inspiron/default.nix @@ -7,8 +7,6 @@ networking.hostName = "inspiron"; - environment.sessionVariables.FLAKE = "/home/seb/Projects/nixos/my-config"; - myConfig = { boot-loader = { systemd-boot.enable = true; diff --git a/hosts/north/default.nix b/hosts/north/default.nix index 9ed355e..55a39e1 100644 --- a/hosts/north/default.nix +++ b/hosts/north/default.nix @@ -7,8 +7,6 @@ networking.hostName = "north"; - environment.sessionVariables.FLAKE = "/home/seb/Projects/nixos/my-config"; - myConfig = { boot-loader = { systemd-boot.enable = true; diff --git a/modules/home/shell/aliases.nix b/modules/home/shell/aliases.nix index 201abd8..9daa9a8 100644 --- a/modules/home/shell/aliases.nix +++ b/modules/home/shell/aliases.nix @@ -13,17 +13,6 @@ home.shellAliases = let - nixAliases = - let - rebuild = "sudo -v && nh os"; - in - { - nrs = "${rebuild} switch"; - nrt = "${rebuild} test"; - nrb = "${rebuild} boot"; - nrrb = "nrb && reboot"; - }; - lsAliases = let aliasList = @@ -91,7 +80,6 @@ }; in lib.mkMerge [ - nixAliases lsAliases catAlias ]; diff --git a/modules/system/nix-helper.nix b/modules/system/nix-helper.nix index fd58f67..9b5eb5c 100644 --- a/modules/system/nix-helper.nix +++ b/modules/system/nix-helper.nix @@ -9,8 +9,20 @@ in }; config = lib.mkIf cfg.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"; + }; + programs.nh.clean = lib.mkIf cfg.auto-gc.enable { enable = true; dates = "daily";