I’m new to NixOS, already rebuild 14 times, but now, system just stop/freeze my pc when I try to rebuild NixOS. I’m delete all generation before 11, reboot, and nothing happen: on rebuild freeze, stopped all processes.
That’s RAM, not disk space. It means one or more of the following:
- You’re not following a channel that is built by hydra (instead, e.g.
masterorrelease-*) - Your tmpfs is in RAM rather than on disk, as set by default
- You’re evaluating many nixpkges
- You have a ridiculous amount of browser tabs and chrome clones open
- You have a very under-resourced system
Without seeing your configuration.nix (and potentially related files and nix-channels), it’s hard to tell you which of these apply.
Yeah, I have ~1650 pkgs
Also:
[romchik@nixos:~]$ nixos-version
25.11.6561.1267bb4920d0 (Xantusia)
and channel has:
nixos nixos-25.11 release nixos-25.11.7346.44bae273f9f8
How can I show configuration.nix?
Pastebins, sourceforges, paste here in code block. There are plenty of options.
Also please share some specs of your computer, like CPU and RAM.
I fix the issue, just remove telegram-desktop in pkgs, but it used to work for me, just a week ago I installed it and everything was fine, but now it installs a lot of packages and interferes with the build.
Also 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, ... }:
{
# Auto-update
system.autoUpgrade.enable = true;
system.autoUpgrade.dates = "weekly";
# Cleanup
nix.gc.automatic = true;
nix.gc.dates = "daily";
nix.gc.options = "--delete-older-than 10d";
nix.settings.auto-optimise-store = true;
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
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 = "";
# Enable networking
networking.networkmanager.enable = true;
# networking.nameservers = [ "8.8.8.8" "1.1.1.1" ];
# users.users.YOUR_USERNAME.groups = [ "networkmanager" ];
networking.wireless.enable = false;
networking.interfaces.wlp3s0.useDHCP = true;
# Set your time zone.
time.timeZone = "Europe/Samara";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.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";
};
# 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, ru";
variant = "";
};
# console.useXkbConfig = true;
# 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;
# 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.romchik = {
isNormalUser = true;
description = "romchik";
extraGroups = [ "networkmanager" "wheel" "bluetooth"];
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
# Swap file
swapDevices = [ {
device = "/swapfile";
size = 16384;
} ];
services.flatpak.enable = true;
environment.systemPackages = with pkgs; [
wget
vivaldi
vscode
zed-editor
git
curl
steam
firefox
neofetch
fastfetch
wpsoffice-cn
p7zip
gnomeExtensions.blur-my-shell
blueman
(python3.withPackages (ps: with ps; [
tkinter
pip
virtualenv
]))
tk
nodejs
nodePackages.typescript
nodePackages.prettier
rustc
cargo
rustfmt
clippy
rust-analyzer
# GNU tools
gcc
gdb
cmake
gnumake
xournalpp
];
services.blueman.enable = true;
security.sudo.extraRules = [
{
groups = [ "wheel" ];
commands = [
{
command = "/run/current-system/sw/bin/firefox";
options = [ "NOPASSWD" ];
}
{
command = "/run/current-system/sw/bin/vivaldi";
options = [ "NOPASSWD" ];
}
{
command = "/run/current-system/sw/bin/code";
options = [ "NOPASSWD" ];
}
];
}
];
programs.dconf = {
enable = true;
profiles.user.databases = [
{
settings = {
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = [ "blur-my-shell@aunetx" ];
};
};
}
];
};
programs.nix-ld.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
# General = {
# Enable = "Source, Sink, Media, Socket";
# Experimental = true;
# };
};
};
# services.vscode-server.enable = true;
# 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 = "25.11"; # Did you read the comment?
}
Right, that’ll explain it. The build for that specific package is currently failing, which means it’s not cached in hydra.
If you ask nix to build a package that isn’t cached, it will try to build it locally. In the case of telegram-desktop, that’s a pretty big build because it’s basically a skin for chrome, which means you’ll be building chrome which can easily take tens of gigabytes of memory and a lot of processing power.
There’s not much you can do about this, occasionally this will just happen if you use those packages.
Electron packages suck for a bunch of other reasons too, like memory use, and even security, since they’re usually relatively outdated versions of chrome that aren’t sandboxed as well. It’d be nice if electron could die already.
Personally, to avoid this, I just use the web versions of these kinds of applications in a normal browser.
I even wrote a wrapper to make them look like separate applications.