Hi everyone I’m trying to switch my config to using flakes but I’m running into these errors when I run the command sudo nixos-rebuild switch --flake .
error: 1 dependencies of derivation '/nix/store/mxaqi6wnq38a0773sqvianx2wjc9jlgb-os-prober-1.83.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ys28iw1knrxzk8g5klvix1q0z21hz7gv-grub-config.xml.drv' failed to build
error: 1 dependencies of derivation '/nix/store/xzfk4lzhb0v6qvwnc3s6zanrr13ps0qn-install-grub.sh.drv' failed to build
error: 1 dependencies of derivation '/nix/store/f9giykkyn67f3vsixdnvi61g33k910hr-nixos-system-nixos-25.05.20241227.634fd46.drv' failed to build
Here are my config files:
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, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./nvidia.nix
];
# Bootloader.
#boot.loader.systemd-boot.enable = true;
#boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.enable = true;
boot.loader.grub.devices = [ "nodev" ];
boot.loader.grub.useOSProber = true; # Use OS Prober to detect Windows
boot.loader.grub.efiSupport = true;
boot.loader.efi.canTouchEfiVariables = true;
# Zen kernel
#boot.kernelPackages = pkgs.linuxPackages_zen;
# Ntfs support
boot.supportedFilesystems = [ "ntfs" ];
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;
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
#services.xserver.displayManager.gdm.enable = true;
#services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# 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;
# 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;
};
# 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.ruvik = {
isNormalUser = true;
description = "Ruvik Victoriano";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
# thunderbird
];
};
# Install firefox.
#programs.firefox.enable = true;
# 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 also installed by default.
ffmpeg-full
toybox
ntfs3g
kitty
yazi
firefox
btop
fish
eza
file
which
tree
mpv
zstd
yt-dlp
networkmanagerapplet
pulseaudio
fzf
gedit
git
yt-dlp
mpv
evince
nautilus
nwg-look
hyprshade
adwaita-icon-theme
#Screenshotting
hyprshot
wl-clipboard
# Nvidia
vaapiVdpau
libvdpau
libvdpau-va-gl
nvidia-vaapi-driver
vdpauinfo
libva
libva-utils
# GStreamer
gst_all_1.gstreamer # Video/Audio data composition framework tools like "gst-inspect", "gst-launch" ...
gst_all_1.gst-plugins-base # Common plugins like "filesrc" to combine within e.g. gst-launch
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
gst_all_1.gst-libav # Plugins to reuse ffmpeg to play almost every video format
gst_all_1.gst-vaapi # Support the Video Audio (Hardware) Acceleration API
# Web Privacy
mullvad-browser
protonvpn-gui
# C and C++ development environment
gcc
clang
gdb # Debugger
cmake
# Editor
vscode-fhs
lxqt.lxqt-policykit
];
# Enable the Flakes feature and the accompanying new nix command-line tool
nix.settings.experimental-features = [ "nix-command" "flakes" ];
services = {
displayManager = {
defaultSession = "hyprland-uwsm";
sddm = {
enable = true;
theme = "catppuccin-mocha";
package = pkgs.kdePackages.sddm;
wayland.enable = true;
};
};
};
services.gnome.gnome-keyring.enable = true;
security.pam.services.sddm.enableGnomeKeyring = true;
# Flatpak support
services.flatpak.enable = true;
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
font-awesome
noto-fonts
corefonts
nerd-fonts.hack
nerd-fonts.jetbrains-mono
];
};
programs = {
zsh.enable = true;
hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
};
};
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
# zram
zramSwap = {
enable = true;
priority = 100;
memoryPercent = 100;
swapDevices = 1;
algorithm = "zstd";
};
# Cpu powersave
boot.kernelParams = [ "amd_pstate=guided" ];
powerManagement.enable = true;
powerManagement.cpuFreqGovernor = "schedutil";
# 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.11"; # Did you read the comment?
}
flake.nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, home-manager, ...}: {
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.ruvik = import ./home-manager;
}
];
};
};
};
}
I’ve tried to run nix-collect-garbage and delete the paths manually from /nix/store/ but nothing changes. What can I do? Thx