Hello everyone,
im new to NixOs (3rd day today) and
i tried to add a nix file, after taking it out again and entering the rebuild command
it ends in this error code:
```
error:… while calling the ‘seq’ builtinat /nix/store/nv0f6mcdixfwhjqxnnrk3iwfvkgbrxjl-source/lib/modules.nix:361:18:360| options = checked options;361| config = checked (removeAttrs config [ “_module” ]);| ^362| _module = checked (config._module);
… while evaluating a branch condition
at /nix/store/nv0f6mcdixfwhjqxnnrk3iwfvkgbrxjl-source/lib/modules.nix:297:9:
296| checkUnmatched =
297| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != then
| ^
298| let
… while evaluating the module argument `pkgs’ in “/nix/store/nv0f6mcdixfwhjqxnnrk3iwfvkgbrxjl-source/nixos/modules/services/hardware/bluetooth.nix”:
… noting that argument pkgs is not externally provided, so querying _module.args instead, requiring config
… while evaluating the option `nixpkgs.localSystem’:
… while evaluating the option `nixpkgs.system’:
(stack trace truncated; use ‘–show-trace’ to show the full, detailed trace)
error: Neither nixpkgs.hostPlatform nor the legacy option nixpkgs.system has been set.
You can set nixpkgs.hostPlatform in hardware-configuration.nix by re-running
a recent version of nixos-generate-config.
The option nixpkgs.system is still fully supported for NixOS 22.05 interoperability,
but will be deprecated in the future, so we recommend to set nixpkgs.hostPlatform.
Command ‘nix --extra-experimental-features ‘nix-command flakes’ build --print-out-paths ‘/etc/nixos#nixosConfigurations.“nixos”.config.system.build.nixos-rebuild’ --no-link’ returned non-zero exit status 1.
```
i tried this solution to add my channel again : How to Fix 'nixpkgs' Not Found in Nix Search Path After Installing with sh — w3tutorials.net with solution four, number five didnt work because i cant write in the nix.nofig.
Channel ist stable 25.05, i can update but the error from above is still there when i enter the rebuild command.
here is my configuration.nix:
```
Edit this configuration file to define what should be installed on
your system. Help is available in the configuration.nix(5) man page
and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, … }:
with lib;
{imports =[ # Include the results of the hardware scan.#./fuzzel.nix
./steam.nix
#./flatpak.nix#./vicinae.nix];
Bootloader.
boot = {loader = {systemd-boot.enable = true;efi.canTouchEfiVariables = true;systemd-boot.configurationLimit = 10; # Show up to 10 generations};
Use latest kernel.
kernelPackages = pkgs.linuxPackages_latest;kernelParams = [“amdgpu.dc=1”“amd_iommu=on”“acpi_osi=Linux”];kernelModules = [“kvm-amd”“amdgpu”“tpm_cbr”];extraModprobeConfig = “options amdgpu ppfeaturemask=0xffffffff\n\n”;bootspec = {enableValidation = true;};};networking.hostName = “nixos”; # Define your hostname.#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
Configure network proxy if necessary
networking.proxy.default = “http://user:password@proxy:port/”;
networking.proxy.noProxy = “127.0.0.1,localhost,internal.domain”;
Enable networking
networking.networkmanager.enable = true;
Set your time zone.
time.timeZone = “Europe/Berlin”;
Select internationalisation properties.
i18n.defaultLocale = “de_DE.UTF-8”;
i18n.extraLocaleSettings = {LC_ADDRESS = “de_DE.UTF-8”;LC_IDENTIFICATION = “de_DE.UTF-8”;LC_MEASUREMENT = “de_DE.UTF-8”;LC_MONETARY = “de_DE.UTF-8”;LC_NAME = “de_DE.UTF-8”;LC_NUMERIC = “de_DE.UTF-8”;LC_PAPER = “de_DE.UTF-8”;LC_TELEPHONE = “de_DE.UTF-8”;LC_TIME = “de_DE.UTF-8”;};
Fonts
fonts = {enableDefaultPackages = true;packages = with pkgs; [corefontsatkinson-hyperlegiblegeist-fontnerd-fonts.fira-codenerd-fonts.geist-monosource-code-pro];};
Enable the X11 windowing system.
You can disable this if you’re only using the Wayland session.
services.xserver.enable = true;
services.xserver.videoDrivers = [ “amdgpu” ];
Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;services.desktopManager.plasma6.enable = true;
Configure keymap in X11
services.xserver.xkb = {layout = “de”;variant = “deadacute”;};
Configure console keymap
console.keyMap = “de”;
Enable CUPS to print documents.
services.printing.enable = true;
Enable sound with pipewire.
services.pulseaudio.enable = false;security.rtkit.enable = true;services.pipewire = {enable = true;alsa.enable = true;alsa.support32Bit = true;pulse.enable = true;wireplumber.enable = true;
If you want to use JACK applications, uncomment this
#jack.enable = true;
use the example session manager (no others are packaged yet so this is enabled by default,
no need to redefine it in your config for now)
#media-session.enable = true;
};
Hardware Configuration #Steam #Controller #OpenGL #fwupd #Bluetooth
hardware = {graphics = {enable = true;enable32Bit = true;extraPackages = with pkgs; [rocmPackages.clr.icd # OpenCLlibva # VA-API];extraPackages32 = ;};amdgpu = {initrd.enable = true;opencl.enable = true;overdrive.enable = true;};steam-hardware.enable = true;#xone.enable = true;#xpadneo.enable = true;cpu.amd.updateMicrocode = true;
bluetooth = {enable = true;powerOnBoot = true;settings = {General = {
Shows battery charge of connected devices on supported
Bluetooth adapters. Defaults to ‘false’.
Experimental = true;
When enabled other devices can connect faster to us, however
the tradeoff is increased power consumption. Defaults to
‘false’.
FastConnectable = true;};Policy = {
Enable all controllers when they are found. This includes
adapters present on start as well as adapters that are plugged
in later on. Defaults to ‘true’.
AutoEnable = true;};};};};hardware.enableAllFirmware = true;
Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
Define a user account. Don’t forget to set a password with ‘passwd’.
users.users.xenomorph = {isNormalUser = true;description = "Thorsten ";extraGroups = [ “networkmanager”“wheel”“audio”“gamemode”“cpugovctl”“sysctlgroup”“libvirtd”“kvm”“input”“plugdev”“tss”“immich”];packages = with pkgs; [kdePackages.katethunderbird];};
Install openrgb
services.hardware.openrgb.enable = true;
Gui BluetoothManager
services.blueman.enable = true;
List packages installed in system profile. To search, run:
#$ nix search wgetenvironment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
pkgs.vimPlugins.clever-f-vim
Terminal
wgetfastfetchkittyninjacmakegnumakecurlgittree
zsh
zshoh-my-zshzsh-autocompletezsh-autosuggestionszsh-fast-syntax-highlightingzsh-syntax-highlighting
Multimedia
musikcubempvlutrispkgs.heroic#pkgs.heroic-unwrappedlegendary-gl # epic launcher#pkgs.steam#steamsteam-runpkgs.protonpluspkgs.pavucontrol
Communication
#pkgs.zapzapwasistlossignal-desktoppkgs.protonmail-desktoppkgs.protonmail-bridge
programs
pkgs.vicinae #server start not at bootfuzzel#rofigearlever
python
python315python313Packages.pippipx
pirate
protonvpn-guiqbittorrent
xorg
xorg.libXcursorxorg.libXixorg.libXineramaxorg.libXScrnSaver
lib
libpnglibpulseaudiolibvorbisstdenv.cc.cc.lib # Provides libstdc++.so.6libkrb5libjxllibadwaita
Secureboot
sbctl
LUKS
tpm2-toolstpm2-tsstpm2-abrmd
Security keys
fido2-managelibfido2gnupg
General utilities
swaybghome-managerbtoprangerkdePackages.filelightlibreoffice-qt-freshkeyutilsbluezopenrgb-with-all-pluginskdePackages.discoverwineWowPackages.waylandFull#pkgs.airgeddonkdePackages.plasma-browser-integrationwgettpm-toolstpm2-toolstpm2-tsswaylandrarunrar-freebatusbutilstldrffmpegimagemagickzipunzip(uutils-coreutils.override { prefix = “”; })nix-prefetch-gitnixfmt-rfc-stylestatixcachixclinfosolaarnettoolstealdeerxclipbat
AMD
amdgpu_top # tool to display AMDGPU usage
Graphics
mesamangohudgamescope
Virtualization stuff
spice-gtkswtpmOVMFFull
Drivers
dxvkvkd3d-proton
Wine
winewinePackages.waylandFullwinetricksprotonup-qt];
Some programs need SUID wrappers, can be configured further or are
started in user sessions.
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
List services that you want to enable:
Enable the OpenSSH daemon.
services.openssh.enable = true;
Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ … ];
networking.firewall.allowedUDPPorts = [ … ];
Or disable the firewall altogether.
networking.firewall.enable = false;
This value determines the NixOS release from which the default
settings for stateful data, like file locations and database versions
on your system were taken. It‘s perfectly fine and recommended to leave
this value at the release version of the first install of this system.
Before changing this value read the documentation for this option
(e.g. man configuration.nix or on ).
system.stateVersion = “25.11”; # Did you read the comment?
Activate flakes install
nix.settings.experimental-features = [ “nix-command” “flakes” ];
Shell set up
for global user
users.defaultUserShell=pkgs.zsh;
For a specific user
users.users.xenomorph.shell = pkgs.zsh;users.users.xenomorph.useDefaultShell = true;programs.zsh.enable = true;
enable zsh and oh my zsh
programs.steam = {enable = true;remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote PlaydedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated ServerlocalNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [“steam”“steam-original”“steam-unwrapped”“steam-run”];
services = {
flatpak = {
enable = true;
};
fwupd.enable = true;
spice-vdagentd.enable = true;
spice-webdavd.enable = true;
resolved.enable = true;
gnome.gnome-keyring.enable = true;
};programs = {niri.enable = true; # enable niri as window managerxwayland.enable = true;firefox.enable = true;adb.enable = true;gamescope.enable = true;gamemode.enable = true;nano = {enable = true;nanorc = “set mouseset autoindentset linenumbersset constantshowset noconvertset preserveset smarthomeset tabsize 4set tabstospacesset wordboundsset zapset errorcolor brightwhite,redset functioncolor greenset keycolor cyanset numbercolor cyanset selectedcolor brightwhite,magentaset statuscolor cyanset stripecolor ,yellowset titlecolor brightwhite,blue”;syntaxHighlight = true;};nh = {enable = true;clean = {enable = true;dates = “weekly”;extraArgs = “–keep 5 --keep-since 3d”;};flake = “/etc/nixos/”;};virt-manager = {enable = true;package = pkgs.virt-manager;};
appimage = {
enable = true;
binfmt = true;
};
};
Virtualization software
virtualisation = {spiceUSBRedirection.enable = true;libvirtd = {enable = true;qemu = {vhostUserPackages = [ pkgs.virtiofsd ];swtpm.enable = true;runAsRoot = true;};};};
Allow unstable packages.
nixpkgs.config = {allowUnfree = true;packageOverrides = pkgs: {unstable = import {config = config.nixpkgs.config;};};};
}
```