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: #{
|
||||
#${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;}
|
||||
|
|
|
@ -17,7 +17,7 @@ in {
|
|||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
# to add more append // (host_helper example);
|
||||
nixosConfigurations = builtins.mapAttrs (name: options: (hostHelper name)) {
|
||||
nixosConfigurations = builtins.mapAttrs (hostName: hostOptions: (hostHelper hostName hostOptions)) {
|
||||
crocoite = {};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue