Skip to content

Commit

Permalink
add hosts specialArg to allow for modules to reference other host's c…
Browse files Browse the repository at this point in the history
…onfiguration
  • Loading branch information
Pacman99 committed Mar 15, 2021
1 parent f53b6a4 commit 0144da6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let
modules;
};

global = {
global = { config, ... }: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;

Expand All @@ -42,6 +42,11 @@ let

nixpkgs = { inherit pkgs; };

_module.args = {
hosts = builtins.mapAttrs (_: host: host.config)
(removeAttrs hosts [ config.networking.hostName ]);
};

nix.registry = {
devos.flake = self;
nixos.flake = nixos;
Expand Down

0 comments on commit 0144da6

Please sign in to comment.