error:
building the system configuration...
updating GRUB 2 menu...
cannot copy /nix/store/4bxj8hkr809zsjzj892gmmlcqyfzxs5f-initrd-linux-zen-6.12.2/initrd to /boot/kernels/4bxj8hkr809zsjzj892gmmlcqyfzxs5f-initrd-linux-zen-6.12.2-initrd.tmp: No space left on device
Failed to install bootloader
warning: error(s) occurred while switching to the new configuration
I used to solve this with rm /boot/kernels
, but now it stopped working.
configuration.nix:
{
config,
pkgs,
catppuccin,
inputs,
...
}: {
imports = [
./hardware-configuration.nix
./packages.nix
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.gc = {
automatic = true;
dates = "weekly";
};
catppuccin = {
tty.enable = true;
grub.enable = true;
# plymouth.enable = true;
};
boot.loader = {
# systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
devices = ["nodev"];
enable = true;
efiSupport = true;
useOSProber = false;
};
};
# boot.plymouth.enable = true;
networking.hostName = "nixos";
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.displayManager.gdm.wayland = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
# 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;
};
users.users.inari = {
isNormalUser = true;
description = "Maxim";
extraGroups = [
"networkmanager"
"wheel"
"libvirtd"
];
shell = pkgs.nushell;
};
nixpkgs.config.allowUnfree = true;
system.stateVersion = "24.05"; # Did you read the comment?
}
hardware-configuration.nix:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.kernelPackages = pkgs.linuxPackages_zen;
# boot.kernelPackages = pkgs.linuxPackages_xanmod;
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"uas"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [
"nvidia"
"nvidia_modeset"
"nvidia_drm"
"nvidia_uvm"
];
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.package = config.boot.kernelPackages.nvidiaPackages.beta;
hardware.nvidia.open = false;
hardware.nvidia.prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
}