I’m running NixOS with the following system configuration:
`/etc/nixos/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
<home-manager/nixos>
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "CNU352DG8J-nxo"; # 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 = "US/Central";
# 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";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable mDNS for .local domains for automatic printer discovery
services.avahi.enable = true;
services.avahi.nssmdns4 = 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;
};
services.libinput.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.lain = {
isNormalUser = true;
description = "Lain I.";
extraGroups = [ "networkmanager" "wheel" ];
# FIXME figure out what the declarative alternative to loginctl enable-linger is
};
# FIXME need to make this narrower
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
home-manager
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# 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?
}
and the following user home-manager configuration:
`~/.config/home-manager/home.nix`
{ config, pkgs, ... }:
{
home.username = "lain";
home.homeDirectory = "/home/lain";
home.stateVersion = "23.11";
programs.home-manager.enable = true;
programs.bash.enable = true;
home.packages = with pkgs; [
# Misc
firefox
mpv
##librewolf # tfw librewolf is broken
# FIXME:
# https://github.com/NixOS/nixpkgs/issues/336490
# https://www.reddit.com/r/NixOS/comments/1ezu788/using_3rdparty_repos_with_homemanager/
nano
libreoffice-qt # NOTE: using -qt while on the Plasma desktop
elinks
# System Administration
sensible-utils
file
xdiskusage
p7zip
tmux
htop
# Casual Devtools
gitFull git-lfs
nodejs_20
# Special
#(python312Full.withPackages (ps: with ps; [
# pillow
# matplotlib
#]))
fahclient
##(llama-cpp.overrideAttrs (old : {
## patches = (old.patches or []) ++ [
## /home/lain/Documents/projects/llama-sandbox/fix-llamacpp-6723.patch
## ];
##}))
##(builtins.getFlake "gitlab:doronbehar/nix-matlab") # FIXME how to make this identify as "locked"??
];
home.sessionVariables = {
HISTIGNORE = " *";
};
## home.sessionPath = {
## "${XDG_DATA_HOME-${HOME}/.local}/bin" # FIXME this throws an error because bash syntax isn't allowed
## };
systemd.user.services.fahclient = {
Unit = {
Type = "simple";
Description = "Folding@home client";
After = [ "network.target" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "systemd-inhibit --why=\"folding\" fah-client";
WorkingDirectory = "%h/.local/share/fahclient";
};
};
#home.file = { };
}
I was having some known issues with Firefox (plus some persistent Blocker-level issues loading other websites, which I’m still gathering data to report) so I tried to launch a different browser,
nix run 'nixpkgs#chromium'
only to get this error:
[1008/204231.540368:ERROR:process_memory_range.cc(75)] read out of range
Bus error (core dumped)
Ungoogled chromium gives exactly the same error, except without the first line.
Appending -- --user-data-dir="$(mktemp -d)"
to the command for a sure fresh start also doesn’t fix anything.
I tried running this command to update my system:
sudo nixos-rebuild switch --upgrade && home-manager switch
which executed without any kind of error, but it didn’t fix my problem, even after a reboot.
What else can I try?