Hello everyone and happy new year!
I have noticed that my unstable-small
system is compiling quite a bit.
If it already is doing that I would like it to produce optimized code.
I have tried adding
nixpkgs.hostPlatform.gcc = {
arch = "znver3";
tune = "znver3";
system = "x86_64-linux";
};
to my config, like the wiki suggests. However I get these errors:
# nixos-rebuild test
error:
… while evaluating the attribute 'config'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12284:
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12293:
… while evaluating the module argument `pkgs' in "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/hardware/bluetooth.nix":
… while evaluating the option `nixpkgs.buildPlatform':
… while evaluating the option `nixpkgs.hostPlatform':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'system' missing
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/systems/default.nix:1:2711:
building Nix...
error:
… while evaluating the attribute 'config'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12284:
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12293:
… while evaluating the module argument `pkgs' in "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/hardware/bluetooth.nix":
… while evaluating the option `nixpkgs.buildPlatform':
… while evaluating the option `nixpkgs.hostPlatform':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'system' missing
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/systems/default.nix:1:2711:
building the system configuration...
error:
… while evaluating the attribute 'config.system.build.toplevel'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12284:
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:1:12293:
… while evaluating the module argument `pkgs' in "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/hardware/bluetooth.nix":
… while evaluating the option `nixpkgs.buildPlatform':
… while evaluating the option `nixpkgs.hostPlatform':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'system' missing
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/systems/default.nix:1:2711:
When I change hostPlatform
to localSystem
(inspired by this post) I get told that it is a legacy option and I should not use it while the rebuild fails because of conflicting nixpkgs.hostPlatform
in hardware-configuration.nix
.
Does any of you know how to make this work?