feat: add unstable option to hostHelper

This commit is contained in:
Ranomier 2025-05-04 18:12:17 +02:00
parent a5040dcc1b
commit 8191d1be67
2 changed files with 9 additions and 4 deletions

View file

@ -1,6 +1,11 @@
inArgs: hostname: #{
#${hostname} = inArgs.nixpkgs.lib.nixosSystem {
inArgs.nixpkgs.lib.nixosSystem {
inArgs: hostname: hostOptions:
let
nixosSystem =
if (hostOptions ? unstable && hostOptions.unstable)
then inArgs.nixos-unstable.lib.nixosSystem
else inArgs.nixpkgs.lib.nixosSystem;
in
nixosSystem {
specialArgs = {inherit inArgs;};
modules = [
{networking.hostName = hostname;}