# Nimmo's NixOS Configurations (Electra & Lena) This repository manages the NixOS configurations for multiple machines using **Flakes**. * **Electra:** Framework 16 (Strix Point + RTX 5070) - High Performance / Gaming. * **Lena:** Secondary Laptop - Standard / Light Use. ## 1. Directory Structure * `common/`: Shared configuration (Users, GUI Apps, CLI Tools, Fonts, Plasma Settings). * `hosts/electra/`: Electra-specific hardware config, kernel parameters, and strict boot modes. * `hosts/lena/`: Lena-specific hardware config. * `flake.nix`: Entry point defining both hosts. --- ## 2. Initial Setup (Electra Only - BIOS) **Crucial:** Before booting NixOS on Electra, you must configure the BIOS to handle the memory split for LLMs. 1. Reboot and enter BIOS (F2 or Del). 2. Find **Graphics Memory**, **UMA Frame Buffer**, or **iGPU Memory**. 3. Set this to **16G** (or "Game Optimized"). --- ## 3. Installation Guide Once you have booted the **NixOS Unstable ISO**: ### Step 1: Disk Partitioning & Mounting Follow standard NixOS procedure (or see previous version of this README for BTRFS subvolume layout). Mount your root to `/mnt`. ### Step 2: Clone Configuration We will clone the repo into the user's Scripts folder (persistent location), but for installation we can clone it temporarily or directly to the target. **Recommended approach for Install:** 1. **Clone to /mnt/etc/nixos (Temporary):** ```bash # Replace USERNAME with your git user nix-shell -p git --run "git clone https://git.nimmog.uk/nimmo/nixos-config.git /mnt/etc/nixos" ``` 2. **Generate Hardware Config:** ```bash nixos-generate-config --root /mnt ``` 3. **Move Hardware Config to Correct Host Folder:** **For Electra:** ```bash mv /mnt/etc/nixos/hardware-configuration.nix /mnt/etc/nixos/hosts/electra/hardware-configuration.nix ``` **For Lena:** ```bash mv /mnt/etc/nixos/hardware-configuration.nix /mnt/etc/nixos/hosts/lena/hardware-configuration.nix ``` ### Step 3: Install & Set Password 1. **Run the Installer:** **For Electra:** ```bash nixos-install --flake /mnt/etc/nixos#electra ``` **For Lena:** ```bash nixos-install --flake /mnt/etc/nixos#lena ``` 2. **Set User Password:** Do not reboot yet! ```bash nixos-enter passwd nimmo exit ``` 3. **Reboot:** `reboot` --- ## 4. Post-Installation & Management After rebooting, move your config to your home folder for easier management. 1. **Move Config:** ```bash mkdir -p ~/Scripts sudo mv /etc/nixos ~/Scripts/nixos-config sudo chown -R nimmo:users ~/Scripts/nixos-config ``` 2. **Apply Changes:** From now on, edit files in `~/Scripts/nixos-config`. * **Edit:** `nano ~/Scripts/nixos-config/common/user-apps.nix` (or other files) * **Rebuild (Electra):** ```bash sudo nixos-rebuild switch --flake ~/Scripts/nixos-config/#electra ``` * **Rebuild (Lena):** ```bash sudo nixos-rebuild switch --flake ~/Scripts/nixos-config/#lena ``` 3. **Adding Apps:** * **CLI Tools:** Edit `common/system-utils.nix` * **GUI Apps:** Edit `common/user-apps.nix` --- ## 5. Electra Specifics ### Boot Modes Electra has specialized boot modes selectable at startup: 1. **NixOS Default:** NVIDIA + Balanced Power (Use when GPU module is inserted). 2. **Gaming-Zen:** NVIDIA + Zen Kernel + Max Performance. 3. **Eco-Battery:** NVIDIA + TLP (Max Saver). 4. **No-dGPU:** **iGPU Only**. Use this when the GPU module is physically replaced with the Expansion Shell. ### Bus IDs * **NVIDIA:** 193 (`c1:00.0`) * **AMD:** 194 (`c2:00.0`) --- ## 6. Docker Docker is installed in Rootless mode. ```bash docker run hello-world ``` ## 7. Fingerprint Reader * **Login:** Password only (required for KWallet). * **Sudo/Unlock:** Fingerprint enabled.