From 467330c4eeb1512a265fddbde242f77a14314c17 Mon Sep 17 00:00:00 2001 From: rope Date: Mon, 28 Sep 2026 14:40:05 +0100 Subject: [PATCH] Add FredOS-Eee: i686 netbook, XFCE; bump nixpkgs to 5e2305d Co-Authored-By: Claude Opus 5.5 --- flake.lock | 6 ++-- flake.nix | 4 +++ hosts/FredOS-Eee.nix | 54 +++++++++++++++++++++++++++++++++++ hosts/hardware/FredOS-Eee.nix | 36 +++++++++++++++++++++++ 4 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 hosts/FredOS-Eee.nix create mode 100644 hosts/hardware/FredOS-Eee.nix diff --git a/flake.lock b/flake.lock index f679bab..c06d36f 100644 --- a/flake.lock +++ b/flake.lock @@ -267,11 +267,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1789542786, - "narHash": "sha256-ajQuqcxnj6RYnwCjA/9FTCnrdR2+BDzstE8UembXf60=", + "lastModified": 1790450978, + "narHash": "sha256-/eLCD/X9kaWJqPR47+fDozEC87Hjmm3i8gJbYmDAD7g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4c7870105e7f1fdf9c48688c8d7efc21abf0688a", + "rev": "5e2305d577ca00acbba631b05cb1094d172b29f3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 089b91f..8722dea 100644 --- a/flake.nix +++ b/flake.nix @@ -90,6 +90,10 @@ FredOS-Mediaserver = mkHost "FredOS-Mediaserver" [ ./hosts/hardware/FredOS-Mediaserver.nix ]; FredOS-Macbook = mkHost "FredOS-Macbook" [ ./hosts/hardware/FredOS-Macbook.nix ]; FredOS-Kayla = mkHost "FredOS-Kayla" [ ./hosts/hardware/FredOS-Kayla.nix ]; + # i686 netbook: no common.nix/stylix/home-manager (see hosts/FredOS-Eee.nix). + FredOS-Eee = nixpkgs.lib.nixosSystem { + modules = [ ./hosts/FredOS-Eee.nix ./hosts/hardware/FredOS-Eee.nix ]; + }; }; }; } diff --git a/hosts/FredOS-Eee.nix b/hosts/FredOS-Eee.nix new file mode 100644 index 0000000..fde2ac4 --- /dev/null +++ b/hosts/FredOS-Eee.nix @@ -0,0 +1,54 @@ +# FredOS-Eee — Asus Eee PC 1000HG, a toy netbook running XFCE. +# +# Not built from common.nix: stylix, home-manager and hyprland would all +# compile from source for i686 (almost nothing is in cache.nixos.org for it) +# and wouldn't fit in 1GB anyway. Only locale + users are shared. +# +# Build on the server, never on the Eee — evaluating this flake alone would +# eat its 1GB. +{ config, lib, pkgs, ... }: +{ + imports = [ + ../settings/locale.nix + ../settings/users.nix + ]; + + nixpkgs.overlays = [ + (final: prev: { + # partial-protected-regular-retry-linux fails on i686; the binary is fine. + rsync = prev.rsync.overrideAttrs { doCheck = false; }; + # Tests need gjs -> spidermonkey, an hour+ of i686 compile for a check. + libsecret = prev.libsecret.overrideAttrs { doCheck = false; }; + }) + ]; + + # Portals (flatpak-style sandbox plumbing) drag in gnome-settings-daemon, + # cinnamon-desktop and pulseaudio. Nothing here needs them. + xdg.portal.enable = lib.mkForce false; + # Plain gvfs: no gnome-online-accounts. + services.gvfs.package = pkgs.gvfs; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + networking.networkmanager.enable = true; + + services.xserver.enable = true; + services.xserver.desktopManager.xfce.enable = true; + # Thunar thumbnails: tumbler -> libgepub -> webkitgtk, hours of i686 compile. + services.tumbler.enable = lib.mkForce false; + services.displayManager.autoLogin = { + enable = true; + user = "fred"; + }; + + services.openssh.enable = true; + # The server's key, so it can push closures and poke at the box. + users.users.fred.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMbIdOSPjnJYQ7z7n0mHKo8T8PnAkCyIBCmT4KpsHyy/ fred@FredOS-Mediaserver" + ]; + + # 1GB RAM: compressed swap in front of the disk swap. + zramSwap.enable = true; + + # The NixOS manual is a big from-source build on i686 for a page nobody reads. + documentation.nixos.enable = false; +} diff --git a/hosts/hardware/FredOS-Eee.nix b/hosts/hardware/FredOS-Eee.nix new file mode 100644 index 0000000..18aef4e --- /dev/null +++ b/hosts/hardware/FredOS-Eee.nix @@ -0,0 +1,36 @@ +#./hosts/hardware/FredOS-Eee.nix +# +# Asus Eee PC 1000HG: Atom N270 (i686 only, no x86_64), 1GB RAM, GMA 945, +# Atheros AR242x wifi. BIOS only, MBR disk: sda1 root, sda2 swap. +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + boot.loader.grub = { + enable = true; + device = "/dev/sda"; + }; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/3b1f4a1a-a5f7-480d-8bc1-a372b846d22c"; + fsType = "ext4"; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/32ca4097-0ea0-4594-998c-c5756591530e"; } + ]; + + nixpkgs.hostPlatform = "i686-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.enableRedistributableFirmware = true; + networking.hostName = "FredOS-Eee"; + + system.stateVersion = "26.05"; +}