Skip to content

Commit

Permalink
feat: update nix-registry on user environment(homeConfiguration) (#6)
Browse files Browse the repository at this point in the history
* feat: update nix-registry on user environment(homeConfiguration)

* fix: remove duplicate code
  • Loading branch information
badele authored Nov 24, 2024
1 parent c6294dc commit 3837bca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
useGlobalPkgs = true;
useUserPackages = true;
verbose = true;
extraSpecialArgs = { inputs = self.inputs; };
users = {
root = import ./users/root/b4d14.nix;
badele = {
Expand Down Expand Up @@ -166,6 +167,7 @@
useGlobalPkgs = true;
useUserPackages = true;
verbose = true;
extraSpecialArgs = { inputs = self.inputs; };
users = {
root = import ./users/root/badxps.nix;
badele = {
Expand Down
9 changes: 8 additions & 1 deletion nix/home-manager/features/term/base.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, inputs, lib, outputs, pkgs, ... }: {
{ config, inputs, lib, pkgs, ... }: {

imports = [
# Hardware informations
Expand All @@ -25,6 +25,13 @@
};

nix = {
# Add all flake inputs to registry / CMD: nix registry list
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
# Add all flake inputs to legacy / CMD: echo $NIX_PATH | tr ":" "\n"

nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}")
config.nix.registry;

package = lib.mkForce pkgs.nix;
settings = {
experimental-features = [ "nix-command" "flakes" ];
Expand Down

0 comments on commit 3837bca

Please sign in to comment.