Ideas on this are welcome:
https://github.com/srid/nixos-flake/issues/51
(Need this for a Juspay internal repo, actually)
I tried this: https://github.com/shivaraj-bh/nixos-flake/commit/183fc4d5a38875a9e2cf97728f3b354a25295f2e
It works if we don’t use nixosModules.home-manager.That can be fixed, if we allowspecifying home-manger input as well
This will break the existing API though
I have tried that approach. Two disadvantages to it:
colmena-flake
(but that's more a design fault of colmena than anything else).To address the coupling issue, I thought of just dedicating a flake to each host, whilst sharing common modules from the root flake. So:
# Root flake, with common modules and inputs
./flake.nix
# Host A with its own nixpkgs, etc.
./hosts/a/flake.nix
# Host B with its own nixpkgs, etc.
./hosts/b/flake.nix
There are still some issues with it; I'll have revisit it.
Last updated: Nov 15 2024 at 11:45 UTC