deprecate passing in system with nixosConfiguration

we have this information in both hardware-configuration.nix and factor,
so we don't want to pass this in from the outside.
This commit is contained in:
Jörg Thalheim
2024-09-29 17:52:27 +02:00
parent 808abdff0d
commit 098a43eff9

View File

@@ -55,7 +55,7 @@ let
# TODO: remove default system once we have a hardware-config mechanism # TODO: remove default system once we have a hardware-config mechanism
nixosConfiguration = nixosConfiguration =
{ {
system ? "x86_64-linux", system ? null,
name, name,
pkgs ? null, pkgs ? null,
extraConfig ? { }, extraConfig ? { },
@@ -92,7 +92,7 @@ let
# Machine specific settings # Machine specific settings
clan.core.machineName = name; clan.core.machineName = name;
networking.hostName = lib.mkDefault name; networking.hostName = lib.mkDefault name;
nixpkgs.hostPlatform = lib.mkDefault system; nixpkgs.hostPlatform = lib.mkIf (system != null) (lib.mkDefault system);
# speeds up nix commands by using the nixpkgs from the host system (especially useful in VMs) # speeds up nix commands by using the nixpkgs from the host system (especially useful in VMs)
nix.registry.nixpkgs.to = { nix.registry.nixpkgs.to = {