Hello,
I’ve just installed NixOS 23.05/Gnome on an external SSD connected to my old MacBook Air 11" 2012.
No matter the browser I’m using, over whatever wifi connection, and connected to whatever web site, the browsing session always ends up with a freezing mouse pointer.
Sometimes after about 5 to 10 minutes, the browser shuts down by itself and I’m able to recober control over my NixOS session.
But alternatively, I have to shut down the whole MacBook hardware myself, by pressing the On/Off button a few seconds, and restart the MacBook from zero.
Here’s the configuration.nix file I’m using.
Many thanks in advance for your help.
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’).
JO: This file is located in /etc/nixos/configuration.nix or /mnt/etc/nixos/configuration.nix when in a live environment.
{ config, pkgs, … }:
{
imports =
[ # Include the results of the hardware scan.
<nixos-hardware/apple/macbook-air/6> # JO: Taken from GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks., because wifi was too slow
./hardware-configuration.nix
];
Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = “/dev/sdb”;
boot.loader.grub.useOSProber = true;
networking.hostName = “josnixos”; # Define your hostname. JO: changed from the standard ‘nixos’
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 = “Europe/Paris”;
Select internationalisation properties.
i18n.defaultLocale = “fr_FR.UTF-8”;
i18n.extraLocaleSettings = {
LC_ADDRESS = “fr_FR.UTF-8”;
LC_IDENTIFICATION = “fr_FR.UTF-8”;
LC_MEASUREMENT = “fr_FR.UTF-8”;
LC_MONETARY = “fr_FR.UTF-8”;
LC_NAME = “fr_FR.UTF-8”;
LC_NUMERIC = “fr_FR.UTF-8”;
LC_PAPER = “fr_FR.UTF-8”;
LC_TELEPHONE = “fr_FR.UTF-8”;
LC_TIME = “fr_FR.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 = {
layout = “fr”;
xkbVariant = “mac”;
};
Configure console keymap
console.keyMap = “fr”;
Enable CUPS to print documents.
services.printing.enable = false; # JO: I don’t have a printer, so I reduce vulnerabilities of my system
Enable sound with pipewire.
sound.enable = true;
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.jo = {
isNormalUser = true;
description = “jogu”;
extraGroups = [ “networkmanager” “wheel” “docker” ]; # JO: To allow using sudo on them
packages = with pkgs; [
# firefox JO: moved below to be system wide and not reserved for 1 user
# JO: docker Added to install Veracrypt DEB latest package in NixOS because the Veracrypt native nixos pkg is old and refuses to start when added here above
# JO: apt To have it working for dockerfile processing
# thunderbird
];
};
Allow unfree packages
nixpkgs.config.allowUnfree = true;
JO: mandatory environment variables for some apps
environment.variables = { WXSUPPRESS_SIZER_FLAGS_CHECK = “1”; }; # JO: added for veracrypt to startup without error
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.
wget
firefox
brave # JO: to replace firefox which is crashing too often
librewolf # JO: privacy-focused fork of firefox
veracrypt # JO: Added after testing it ok with ‘nix-shell -p Veracrypt’ command in a Terminal with my user account (not the su one)
obs-studio # JO: video recording and live streaming
];
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 NixOS Search).
system.stateVersion = “23.05”; # Did you read the comment?
JO: Taken from NixOS Manual, to force automatic upgrades after system and packages bug fixes and to upgrade to further NixOS big versions after 23.05
system.autoUpgrade.enable = true;
system.autoUpgrade.allowReboot = false;
JO: To have docker properly working. Below line replaced adding docker in the package list because it did not work. Added docker to install Veracrypt latest
JO: DEB file from Veracrypt web site.
virtualisation.docker.enable = true;
JO: to add the Flatpak repo of self-contained apps
services.flatpak.enable = true;
JO: Automatic Garbage Collection, advised by itsfoss.com NixOS tutorial
nix.gc = {
automatic = true;
dates = “daily”;
options = “–delete-older-than 1d”;
};
JO: Reduce the need for using the swap: 60 by default, reduce to 30, possibly 10 if it does not hurt. As advised by itsfoss.com NixOS tutorial
boot.kernel.sysctl = { “vm.swappiness” = 10;};
}