I’m trying to update my nvidia drivers by editing my configuration.nix but I get the error
error:
… while evaluating the attribute 'config'
at /nix/store/xblysc3prg1zqsi59fr36nj6wdiqryzp-source/lib/modules.nix:334:9:
333| options = checked options;
334| config = checked (removeAttrs config [ "_module" ]);
| ^
335| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/xblysc3prg1zqsi59fr36nj6wdiqryzp-source/lib/modules.nix:334:18:
333| options = checked options;
334| config = checked (removeAttrs config [ "_module" ]);
| ^
335| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)
at «none»:0: (source not available)
building Nix...
error:
… while evaluating the attribute 'config'
at /nix/store/xblysc3prg1zqsi59fr36nj6wdiqryzp-source/lib/modules.nix:334:9:
333| options = checked options;
334| config = checked (removeAttrs config [ "_module" ]);
| ^
335| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/xblysc3prg1zqsi59fr36nj6wdiqryzp-source/lib/modules.nix:334:18:
333| options = checked options;
334| config = checked (removeAttrs config [ "_module" ]);
| ^
335| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)
at «none»:0: (source not available)
building the system configuration...
error:
… while evaluating the attribute 'config.system.build.toplevel'
at /nix/store/xblysc3prg1zqsi59fr36nj6wdiqryzp-source/lib/modules.nix:334:9:
333| options = checked options;
334| config = checked (removeAttrs config [ "_module" ]);
| ^
335| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/xblysc3prg1zqsi59fr36nj6wdiqryzp-source/lib/modules.nix:334:18:
333| options = checked options;
334| config = checked (removeAttrs config [ "_module" ]);
| ^
335| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)
at «none»:0: (source not available)
I don’t think theres anything wrong with my configuration.nix though.
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "madmanmo"; # 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 = "187.1.3.4,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
};
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.madmanmo = {
isNormalUser = true;
description = "madmanmo";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
# Enable sound with pipewire
services.pipewire = {
enable = true;
pulse.enable = true;
jack.enable = true;
};
# Firefox
programs.firefox.enable = true;
# Hyprland
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
environment.sessionVariables = {
# If your cursor becomes invisible
WLR_NO_HARDWARE_CURSOR = "1";
# Hint electron apps to use wayland
NIXOS_OZONE_WL = "1";
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-kde
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
];
};
# Nvidia
# Enable OpenGL
hardware.opengl = {
enable = true;
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.powerManagement.enable = false;
hardware.nvidia.powerManagement.finegrained = false;
hardware.nvidia.open = false;
hardware.nvidia.nvidiaSettings = true;
# Special config to load the latest (535 or 550) driver for the support of the 4070 SU>
config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.58";
sha256_64bit = "sha256-bXvcXkg2kQZuCNKRZM5QoTaTjF4l2TtrsKUvyicj5ew=";
sha256_aarch64 = "sha256-7XswQwW1iFP4ji5mbRQ6PVEhD4SGWpjUJe1o8zoXYRE=";
openSha256 = "sha256-hEAmFISMuXm8tbsrB+WiUcEFuSGRNZ37aKWvf0WJ2/c=";
settingsSha256 = "sha256-vWnrXlBCb3K5uVkDFmJDVq51wrCoqgPF03lSjZOuU8M=";
persistencedSha256 = "sha256-lyYxDuGDTMdGxX3CaiWUh1IQuQlkI2hPEs5LI20vEVw=";
};
# Steam
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
# Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true;
# Open ports in the firewall for Source Dedicated Server
};
# File managment
programs.thunar.enable = true;
programs.thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
services.gvfs.enable = true; # Mount, trash, etc,.
services.tumbler.enable = true; # Thumbnail support for images
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is al>
pkgs.waybar
pkgs.wlogout
pkgs.swaynotificationcenter
pkgs.networkmanagerapplet
pkgs.swww
pkgs.starship
pkgs.gvfs
pkgs.gnome.file-roller
libnotify
wget
pkgs.emacsPackages.doom
cava
obs-studio
kitty
tofi
fastfetch
discord
];
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "JetBrainsMono" "NerdFontsSymbolsOnly" ]; })
];
# 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 https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}