feat: add unstable option to hostHelper
This commit is contained in:
parent
a5040dcc1b
commit
8191d1be67
2 changed files with 9 additions and 4 deletions
|
@ -1,6 +1,11 @@
|
||||||
inArgs: hostname: #{
|
inArgs: hostname: hostOptions:
|
||||||
#${hostname} = inArgs.nixpkgs.lib.nixosSystem {
|
let
|
||||||
inArgs.nixpkgs.lib.nixosSystem {
|
nixosSystem =
|
||||||
|
if (hostOptions ? unstable && hostOptions.unstable)
|
||||||
|
then inArgs.nixos-unstable.lib.nixosSystem
|
||||||
|
else inArgs.nixpkgs.lib.nixosSystem;
|
||||||
|
in
|
||||||
|
nixosSystem {
|
||||||
specialArgs = {inherit inArgs;};
|
specialArgs = {inherit inArgs;};
|
||||||
modules = [
|
modules = [
|
||||||
{networking.hostName = hostname;}
|
{networking.hostName = hostname;}
|
||||||
|
|
|
@ -17,7 +17,7 @@ in {
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
# to add more append // (host_helper example);
|
# to add more append // (host_helper example);
|
||||||
nixosConfigurations = builtins.mapAttrs (name: options: (hostHelper name)) {
|
nixosConfigurations = builtins.mapAttrs (hostName: hostOptions: (hostHelper hostName hostOptions)) {
|
||||||
crocoite = {};
|
crocoite = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue