Skip to content

Commit 3837bca

Browse files
authored
feat: update nix-registry on user environment(homeConfiguration) (#6)
* feat: update nix-registry on user environment(homeConfiguration) * fix: remove duplicate code
1 parent c6294dc commit 3837bca

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
useGlobalPkgs = true;
140140
useUserPackages = true;
141141
verbose = true;
142+
extraSpecialArgs = { inputs = self.inputs; };
142143
users = {
143144
root = import ./users/root/b4d14.nix;
144145
badele = {
@@ -166,6 +167,7 @@
166167
useGlobalPkgs = true;
167168
useUserPackages = true;
168169
verbose = true;
170+
extraSpecialArgs = { inputs = self.inputs; };
169171
users = {
170172
root = import ./users/root/badxps.nix;
171173
badele = {

nix/home-manager/features/term/base.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ config, inputs, lib, outputs, pkgs, ... }: {
1+
{ config, inputs, lib, pkgs, ... }: {
22

33
imports = [
44
# Hardware informations
@@ -25,6 +25,13 @@
2525
};
2626

2727
nix = {
28+
# Add all flake inputs to registry / CMD: nix registry list
29+
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
30+
# Add all flake inputs to legacy / CMD: echo $NIX_PATH | tr ":" "\n"
31+
32+
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}")
33+
config.nix.registry;
34+
2835
package = lib.mkForce pkgs.nix;
2936
settings = {
3037
experimental-features = [ "nix-command" "flakes" ];

0 commit comments

Comments
 (0)