feat: Add little-rascal laptop config and lab-tool auto-update system
## New Machine: little-rascal - Add Lenovo Yoga Slim 7 14ARE05 configuration (AMD Ryzen 7 4700U) - Niri desktop with CLI login (greetd + tuigreet) - zram swap configuration (25% of RAM with zstd) - AMD-optimized hardware support and power management - Based on congenital-optimist structure with laptop-specific additions ## Lab Tool Auto-Update System - Implement Guile Scheme auto-update module (lab/auto-update.scm) - Add health checks, logging, and safety features - Integrate with existing deployment and machine management - Update main CLI with auto-update and auto-update-status commands - Create NixOS service module for automated updates - Document complete implementation in simple-auto-update-plan.md ## MCP Integration - Configure Task Master AI and Context7 MCP servers - Set up local Ollama integration for AI processing - Add proper environment configuration for existing models ## Infrastructure Updates - Add little-rascal to flake.nix with deploy-rs support - Fix common user configuration issues - Create missing emacs.nix module - Update package integrations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5e1061382c
commit
6eac143f57
19 changed files with 1287 additions and 559 deletions
47
machines/little-rascal/About.org
Normal file
47
machines/little-rascal/About.org
Normal file
|
@ -0,0 +1,47 @@
|
|||
#+TITLE: Little Rascal - Development Laptop Configuration
|
||||
#+AUTHOR: Geir
|
||||
#+DATE: 2025-06-27
|
||||
|
||||
* Machine Overview
|
||||
|
||||
** Name: little-rascal
|
||||
Inspired by the Culture ship name "LittleRascal" (GSV) - small but capable, playful personality, perfect for a development laptop that gets into things and experiments.
|
||||
|
||||
** Hardware Type
|
||||
Development laptop - portable, personal machine for coding and experimentation.
|
||||
|
||||
** Role & Purpose
|
||||
- Primary development machine
|
||||
- Portable workstation for coding projects
|
||||
- Testing and experimentation platform
|
||||
- Personal productivity device
|
||||
|
||||
** Desktop Environment
|
||||
- **Display Manager**: CLI login with seatd
|
||||
- **Compositor**: Niri (minimal Wayland compositor)
|
||||
- **Philosophy**: Minimal, efficient, keyboard-driven workflow
|
||||
|
||||
** Key Features
|
||||
- Minimal desktop environment focused on development
|
||||
- CLI-first approach with graphical applications when needed
|
||||
- Full development toolchain (editors, browsers, containers)
|
||||
- Home lab management tools integration
|
||||
- Wayland-native setup for modern hardware support
|
||||
|
||||
** Software Focus
|
||||
- Development: VSCode, Neovim, Git toolchain
|
||||
- Browsers: Firefox, Chromium for testing
|
||||
- Containers: Podman for development environments
|
||||
- Home Lab: Lab tool for infrastructure management
|
||||
- Creative: Lightweight image/video tools when needed
|
||||
|
||||
** Network Role
|
||||
- Development workstation
|
||||
- Connects to home lab infrastructure
|
||||
- Mobile device that can work both at home and remotely
|
||||
|
||||
** Security Profile
|
||||
- Personal development machine
|
||||
- SSH access for remote development
|
||||
- Standard user security model
|
||||
- Development-friendly but secure defaults
|
126
machines/little-rascal/configuration.nix
Normal file
126
machines/little-rascal/configuration.nix
Normal file
|
@ -0,0 +1,126 @@
|
|||
# Little Rascal - Development Laptop Configuration
|
||||
# Based on congenital-optimist with laptop-specific adjustments
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
unstable,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
# Common modules
|
||||
../../modules/common/base.nix
|
||||
../../modules/common/nix.nix
|
||||
../../modules/common/tty.nix
|
||||
../../modules/common/emacs.nix
|
||||
|
||||
# Desktop
|
||||
../../modules/desktop/niri.nix
|
||||
../../modules/desktop/fonts.nix
|
||||
|
||||
# Development
|
||||
../../modules/development/tools.nix
|
||||
../../modules/ai/claude-code.nix
|
||||
|
||||
# Users
|
||||
../../modules/users/geir.nix
|
||||
../../modules/users/common.nix
|
||||
../../modules/users/shell-aliases.nix
|
||||
|
||||
# Virtualization
|
||||
../../modules/virtualization/libvirt.nix
|
||||
../../modules/virtualization/incus.nix
|
||||
../../modules/virtualization/podman.nix
|
||||
|
||||
# Audio
|
||||
../../modules/sound/pipewire.nix
|
||||
|
||||
# Network
|
||||
../../modules/network/common.nix
|
||||
../../modules/network/extraHosts.nix
|
||||
|
||||
# Security
|
||||
../../modules/security/ssh-keys.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "little-rascal";
|
||||
networkmanager.enable = true;
|
||||
|
||||
# Tailscale for home lab access
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [ 41641 ]; # Tailscale
|
||||
allowedTCPPorts = [ 22 ]; # SSH
|
||||
};
|
||||
};
|
||||
|
||||
# Boot configuration
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-amd" "zram" ];
|
||||
tmp.cleanOnBoot = true;
|
||||
|
||||
# zram swap like other machines
|
||||
kernel.sysctl."vm.swappiness" = 180;
|
||||
};
|
||||
|
||||
# zram configuration
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 25; # Use 25% of RAM for zram
|
||||
};
|
||||
|
||||
# Hardware - minimal for laptop
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
graphics.enable = true;
|
||||
};
|
||||
|
||||
# Laptop-specific services
|
||||
services = {
|
||||
# Power management for laptop
|
||||
power-profiles-daemon.enable = true;
|
||||
upower.enable = true;
|
||||
|
||||
# Display manager
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${pkgs.zsh}/bin/zsh";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Essential services
|
||||
tailscale.enable = true;
|
||||
blueman.enable = true;
|
||||
printing.enable = true;
|
||||
|
||||
# Location services for time zone
|
||||
geoclue2.enable = true;
|
||||
};
|
||||
|
||||
# Localization
|
||||
time.timeZone = "Europe/Oslo";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "no";
|
||||
};
|
||||
|
||||
# System version
|
||||
system.stateVersion = "25.05";
|
||||
}
|
125
machines/little-rascal/hardware-configuration.nix
Normal file
125
machines/little-rascal/hardware-configuration.nix
Normal file
|
@ -0,0 +1,125 @@
|
|||
# Hardware Configuration for Little Rascal
|
||||
# Lenovo Yoga Slim 7 14ARE05 - AMD Ryzen 7 4700U
|
||||
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
# Boot configuration for AMD Ryzen 7 4700U
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-amd" ]; # AMD Ryzen system
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
# Filesystem configuration - TEMPLATE
|
||||
# Update these paths and UUIDs after running nixos-generate-config
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/REPLACE-WITH-ROOT-UUID";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/REPLACE-WITH-BOOT-UUID";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Swap configuration - TEMPLATE
|
||||
# Uncomment and update if using swap partition
|
||||
# swapDevices = [
|
||||
# { device = "/dev/disk/by-uuid/REPLACE-WITH-SWAP-UUID"; }
|
||||
# ];
|
||||
|
||||
# Hardware-specific configuration for Lenovo Yoga Slim 7 14ARE05
|
||||
hardware = {
|
||||
# CPU configuration - AMD Ryzen 7 4700U
|
||||
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# Enable firmware updates
|
||||
enableRedistributableFirmware = true;
|
||||
|
||||
# Graphics configuration - AMD Radeon Vega (integrated)
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
|
||||
# AMD integrated graphics drivers
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk # AMD Vulkan driver
|
||||
rocmPackages.clr.icd # OpenCL support
|
||||
];
|
||||
|
||||
# 32-bit support for compatibility
|
||||
extraPackages32 = with pkgs.driversi686Linux; [
|
||||
amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
# Bluetooth support for Intel AX200
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Power management for AMD Ryzen 7 4700U
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
powertop.enable = true; # Power optimization
|
||||
cpuFreqGovernor = "powersave"; # Better battery life
|
||||
};
|
||||
|
||||
# Network hardware - Intel Wi-Fi 6 AX200
|
||||
networking = {
|
||||
# Enable NetworkManager for WiFi management
|
||||
networkmanager.enable = true;
|
||||
|
||||
# Disable wpa_supplicant (using NetworkManager)
|
||||
wireless.enable = false;
|
||||
};
|
||||
|
||||
# Firmware for Intel WiFi and Bluetooth
|
||||
hardware.firmware = with pkgs; [
|
||||
linux-firmware
|
||||
];
|
||||
|
||||
# AMD-specific optimizations
|
||||
boot.kernelParams = [
|
||||
# Enable AMD graphics performance
|
||||
"amdgpu.ppfeaturemask=0xffffffff"
|
||||
];
|
||||
|
||||
# TLP for better power management (alternative to power-profiles-daemon)
|
||||
services.tlp = {
|
||||
enable = false; # Using power-profiles-daemon instead
|
||||
settings = {
|
||||
# Would be configured here if enabled
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
};
|
||||
};
|
||||
|
||||
# Notes for this specific hardware:
|
||||
# - Lenovo Yoga Slim 7 14ARE05
|
||||
# - AMD Ryzen 7 4700U with Radeon Vega Graphics
|
||||
# - 16GB LPDDR4 RAM (soldered, not upgradeable)
|
||||
# - Intel Wi-Fi 6 AX200 + Bluetooth
|
||||
# - 128GB SSD storage
|
||||
# - Currently running btrfs filesystem
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue