ctucx.git: nixfiles

ctucx' nixfiles

commit ce6b629cbdef01d07515930641560a3277f11a3b
parent fcda23e7fa6fc19929920e20e2ee72486bd4063c
Author: Leah (ctucx) <git@ctu.cx>
Date: Thu, 22 Jun 2023 12:05:18 +0200

configurations/common: fix nix-path for old nix-utils
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/configurations/common/default.nix b/configurations/common/default.nix
@@ -1,7 +1,7 @@
 { inputs, config, pkgs, lib, currentSystem, ... }:
 
 let
-  NIX_PATH = lib.cleanSource pkgs.path;
+  NIXPKGS_PATH = lib.cleanSource pkgs.path;
 
 in {
 

@@ -40,7 +40,8 @@ in {
 
   home-manager.useGlobalPkgs    = true;
   home-manager.users.leah.home.sessionVariables = {
-      NIX_PATH = NIX_PATH;
+      NIXPKGS_PATH = NIXPKGS_PATH;
+      NIX_PATH = "nixpkgs=${NIXPKGS_PATH}";
   };
 
   environment.systemPackages = with pkgs; [

@@ -48,7 +49,7 @@ in {
   ];
 
   nix = {
-    nixPath  = lib.mkForce [ "nixpkgs=${NIX_PATH}" ];
+    nixPath  = lib.mkForce [ "nixpkgs=${NIXPKGS_PATH}" ];
     package  = pkgs.nix;
     settings = {
       trusted-users         = [ "root" "leah" "@wheel" ];
diff --git a/configurations/common/programs/bash.nix b/configurations/common/programs/bash.nix
@@ -57,7 +57,7 @@
           use() {
             declare -a all
             for p in "$@"; do
-              all+=("''${NIX_PATH}#$p")
+              all+=("''${NIXPKGS_PATH}#$p")
             done
             eval nix shell ''${all[@]}
           }