nixOS for a 32 bit PC
Yes Debian still supports 32 bit and it is the best. But if you humor something fancier - more personal - try this nixOS configuration.
Carefully crafted for the older bones :-)
# 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
];
# System boot.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2; # Use the GRUB 2 boot loader.Good for old system. Newer ones use efi. Refer to nixos-help
boot.loader.grub.device = "/dev/sda"; # hard drive you want to install Grub.
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus22";
keyMap = "us";
};
# Environment variables
environment.etc.current-nixos-config.source = ./.;
environment.variables = {
NIXOS_CONFIG = "/etc/nixos/configuration.nix";
NIXPKGS_ALLOW_UNFREE = "1";
EDITOR = "vim";
VISUAL = "vim";
BROWSER = "w3m";
RTV_BROWSER = "w3m";
RTV_EDITOR = "vim";
RTV_URLVIEWER = "urlview";
};
# Time
time.timeZone = "America/Los_Angeles";
# Network - Let networkmanager handle this shit.
networking = {
hostName = "desko";
networkmanager.enable = true;
# Open ports in the firewall.
# firewall.allowedTCPPorts = [ ... ];
# firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# firewall.enable = false;
};
# System Services
services.openssh.enable = true; # ssh
services.printing.enable = true; # Print - Do I need it ?
# Enable sound.
sound.enable = true;
sound.mediaKeys.enable = true;
hardware.pulseaudio.enable = true;
# Extra Outputs for all the packages. For example corutils offer info.
environment.extraOutputsToInstall = [ "man" "doc" "info" "devdoc" ];
# Enable Flakes from unstable
nix.package = pkgs.nixUnstable;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
# Configurable modules. If enabled here, They dont need to be installed via pkgs.
# NixOS automatically creates a config file in /etc for these programs.
# Not sure as of now if this is the way to configure packages cuz I beleive in collabaratively built config by people who know these packages well enough and update the config regularly.
# vim , tmux xmonad etc for example have nice config repos on github. Others can go here ?
programs = {
bash.enableCompletion = true;
bash.shellInit =
''
set -o vi;
if command -v fzf-share >/dev/null; then
source "$(fzf-share)/key-bindings.bash"
source "$(fzf-share)/completion.bash"
fi
'';
less.enable = true;
sway.enable = true; #Implements sway wm with sandard config and Wayland - a new replacement for X. If you somwhow dont like Wayland you can uncomment the X option below.
sway.extraPackages = with pkgs; [
xwayland # To Support X applications
dmenu # Program search in Swaybar
wl-clipboard # Wayland clipboard
swaylock # Screen lock in Wayland world
swayidle # Lock sceen afer say 30 minutes of inacivity
termite # Nice terminal. I bind it to Mod+enter in sawy config
light # To control the brighness - works in tty as well as Wayland
mako # Wayland Notifications
waybar # Make sway look like a Desktop with configurable top bar
grim # Wayland compatible screenshots
xdg_utils # Open applicaions with "xdg_open" in wayland too.
];
waybar.enable= true;
tmux = {
enable = true;
aggressiveResize = true;
baseIndex = 1;
keyMode = "vi";
customPaneNavigationAndResize = true;
terminal = "screen-256color";
escapeTime = 1000;
newSession = true;
};
thefuck.enable = true;
};
documentation.man.enable = true;
documentation.man.generateCaches = true;
documentation.nixos.includeAllModules = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.amj = {
isNormalUser = true;
extraGroups = [ "root" "wheel" "networkmanager" "video" "sudo" ];
shell = pkgs.bash;
};
# automatically discover usb devices and mount them.
services.udisks2.enable = true; # Enable udisks2.
services.devmon.enable = true; # Enable external device automounting.
boot.kernelModules = [ "fuse" ]; # Need to figure this out.
# X with only Xmonad - No Plasma, xfce or oher desktop , Uncomment these if you don' intend to use Sway (Wih Wayland.
# In my experience, sway with wayland is around the same speed but feels much better.Highly recommend with proper config.
#services.xserver = {
# enable = true;
# layout = "us";
# autorun = false;
# xkbOptions = "ctrl:nocaps";
# displayManager.defaultSession = "none+xmonad";
# windowManager.xmonad = {
# enable = true;
# enableContribAndExtras = true;
# extraPackages = haskellPackages: [
# haskellPackages.xmonad-contrib
# haskellPackages.xmonad-extras
# haskellPackages.xmonad
# ];
# };
# };
#
# services.xserver.videoDrivers = [ "intel" ]; # To support my old dell display. took me 3 days of back breaking to figure out though it was there in the manual. Its hard to accept that you are old :-).
# services.xserver.deviceSection = ''
# Option "DRI" "2"
# Option "TearFree" "true"
# '';
# Install any additional fonts that I require to be used with xmonad
fonts.fonts = with pkgs; [
opensans-ttf # Used in in my xmobar configuration
];
# Instal apps - Primarily command line; few for graphical.
nixpkgs.config.allowUnfree = true; #For latest firefox. God knows why its unfree.
environment.systemPackages = with pkgs; [
# CLI Apps or rather apps without the need of X or Wayland.
# System Tools / Utilities
git
lazygit
neofetch
fbterm
man
htop
kbd
wget
xsel
tree
unzip
ripgrep
tldr
vifm
megacmd #is free as in free "beer". Other wise not free.
scrot
cozette
pywal
cava
catimg
bashburn
nmap
usbutils
pciutils
fzf
# Write and Research
w3m
(import ./vim.nix)
ddgr
googler
netsurf.browser
newsboat
dict
sc-im
# topydo #didnt build on i386
tmate
# pandoc #didnt build on 32 bit linux
# Communicate
aerc
dante
scdoc
signal-cli
qrencode
# dbus #not needed as this installs a client for dbus.
# Media
cmus
beets
sox
lame
youtube-viewer
youtube-dl
mplayer
# mpv-unwrapped #didn't build on i386
vlc
feh
fim
imagemagick
# Publishing Platforms
github-cli
rtv
# urlscan # Didnt build on i386
urlview
urlwatch
rainbowstream
# Fun Stuff
fortune
figlet
lolcat
# GUI Apps or the apps that need Wayland (or X)
firefox-bin
qutebrowser
audacity
zeal
zathura
# signal-desktop # package is only for 64 bits
tdesktop
];
nixpkgs.config.permittedInsecurePackages = [
"libsixel-1.8.6"
];
nix = {
autoOptimiseStore = true;
};
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "20.09"; # Did you read the comment?
}
No comments yet.
Write a comment