Here’s the full error:
error:
… while calling the 'head' builtin
at /nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/lib/attrsets.nix:1574:11:
1573| || pred here (elemAt values 1) (head values) then
1574| head values
| ^
1575| else
… while evaluating the attribute 'value'
at /nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/lib/modules.nix:816:9:
815| in warnDeprecation opt //
816| { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
817| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `system.systemBuilderArgs':
… while evaluating definitions from `/nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/nixos/modules/system/activation/activatable-system.nix':
… while evaluating the option `system.activationScripts.etc.text':
… while evaluating definitions from `/nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/nixos/modules/system/etc/etc-activation.nix':
… while evaluating definitions from `/nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/nixos/modules/system/etc/etc.nix':
… while evaluating the option `environment.etc.dbus-1.source':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: Package ‘apple-sdk-15.0’ in /nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/pkgs/by-name/ap/apple-sdk/package.nix:115 is not available on the requested hostPlatform:
hostPlatform.config = "x86_64-unknown-linux-gnu"
package.meta.platforms = [
"x86_64-darwin"
"i686-darwin"
"aarch64-darwin"
"armv7a-darwin"
]
package.meta.badPlatforms = [
{
cpu = {
bits = 32;
};
}
]
, refusing to evaluate.
a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.
My configs:
configuration.nix
{ config, pkgs, catppuccin, ... }:
{
imports =
[
./hardware-configuration.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.gc = {
automatic = true;
dates = "weekly";
};
console.catppuccin.enable = true;
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
catppuccin.enable = true;
};
# boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
networking.networkmanager.enable = true;
time.timeZone = "Europe/Moscow";
i18n.defaultLocale = "ru_RU.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "ru_RU.UTF-8";
LC_IDENTIFICATION = "ru_RU.UTF-8";
LC_MEASUREMENT = "ru_RU.UTF-8";
LC_MONETARY = "ru_RU.UTF-8";
LC_NAME = "ru_RU.UTF-8";
LC_NUMERIC = "ru_RU.UTF-8";
LC_PAPER = "ru_RU.UTF-8";
LC_TELEPHONE = "ru_RU.UTF-8";
LC_TIME = "ru_RU.UTF-8";
};
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
users.users.inari = {
isNormalUser = true;
description = "Maxim";
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.fish;
};
programs.fish.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
home-manager
zed-editor
blackbox-terminal
nixd
nautilus
gnome-boxes
gnome-calculator
gnome-disk-utility
fragments
nautilus-open-in-blackbox
heroic
gnome-tweaks
protonup
solaar
ollama-cuda
bat
ripgrep
fzf
zoxide
devenv
eza
catppuccin-cursors
zen-browser
gnomeExtensions.dash-to-dock
gnomeExtensions.blur-my-shell
gnomeExtensions.appindicator
gnomeExtensions.vitals
gnomeExtensions.gsconnect
gnomeExtensions.clipboard-indicator
gnomeExtensions.rounded-window-corners-reborn
gnomeExtensions.solaar-extension
];
programs.nix-ld.enable = true;
programs.steam.enable = true;
programs.steam.gamescopeSession.enable = true;
programs.gamemode.enable = true;
nixpkgs.config.packageOverrides = pkgs: {
zen-browser = pkgs.callPackage ./nonNixPackages/zen-browser/default.nix { };
};
fonts.packages = with pkgs; [
jetbrains-mono
];
services.gnome.core-utilities.enable = false;
environment.gnome.excludePackages = [ pkgs.gnome-tour ];
services.xserver.excludePackages = [ pkgs.xterm ];
services.xserver.desktopManager.xterm.enable = false;
documentation.nixos.enable = false;
programs.nano.enable = false;
system.stateVersion = "24.05"; # Did you read the comment?
}
hardware-configuration.nix
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "uas" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/78657e37-f633-480f-9ff6-1172f749eacc";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AA5A-6F14";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/f294c9c7-b577-4ec6-9bad-e6b7111773d6"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.open = false;
hardware.nvidia.prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
}
flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin.url = "github:catppuccin/nix";
};
outputs = { nixpkgs, home-manager, catppuccin, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in{
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = system;
modules = [ ./configuration.nix catppuccin.nixosModules.catppuccin ];
};
homeConfigurations."inari" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix catppuccin.homeManagerModules.catppuccin ];
};
};
}
home.nix
{ config, pkgs, catppuccin, ... }:
{
home.username = "inari";
home.homeDirectory = "/home/inari";
home.stateVersion = "24.05";
home.sessionVariables = {
EDITOR = "zeditor";
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/inari/.steam/root/compatibilitytools.d";
};
catppuccin = {
enable = true;
pointerCursor.enable = true;
};
gtk = {
enable = true;
catppuccin = {
enable = true;
gnomeShellTheme = true;
icon.enable = true;
};
};
programs = {
fish = {
enable = true;
catppuccin.enable = true;
shellAliases =
let
flakeDir = "~/NixOS";
in{
cat = "bat";
cd = "zoxide";
rb = "sudo nixos-rebuild switch --flake ${flakeDir}";
upd = "sudo nix flake update --flake ${flakeDir}";
upg = "sudo nixos-rebuild switch --upgrade --flake ${flakeDir}";
hm = "home-manager switch --flake ${flakeDir}";
nix-shell = "nix-shell --command fish";
};
shellInit = ''
zoxide init fish | source
'';
};
bat = {
enable = true;
catppuccin.enable = true;
};
fzf = {
enable = true;
catppuccin.enable = true;
};
};
programs.home-manager.enable = true;
}