From 48d2b0f3ddcce1561f7a075aa0aaa0def427ccb4 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 4 Dec 2023 18:54:18 +0800 Subject: [PATCH] config: add option for declaring differing home-manager channel in NixOS configs --- flake.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index d1776f08..0228d9a0 100644 --- a/flake.nix +++ b/flake.nix @@ -158,9 +158,11 @@ # Append with our custom NixOS modules from the modules folder. import ./modules/nixos { inherit lib; isInternal = true; } - # Then, make the most with the modules from the flake inputs. + # Then, make the most with the modules from the flake inputs. Take + # note importing some modules such as home-manager are as part of the + # declarative host config so be sure to check out nixosConfigurations + # output as well. ++ [ - inputs.home-manager.nixosModules.home-manager inputs.nur.nixosModules.nur inputs.sops-nix.nixosModules.sops inputs.guix-overlay.nixosModules.guix @@ -354,6 +356,10 @@ path = ./hosts/${filename}; extraModules = [ ({ lib, ... }: { + imports = [ + inputs.${host.home-manager-channel or "home-manager"}.nixosModules.home-manager + ]; + config = lib.mkMerge [ { networking.hostName = lib.mkForce host._name; }