feat: add little-rascal laptop configuration and deployment
- Add complete NixOS configuration for little-rascal laptop - Include Niri window manager and CLI-focused setup - Add hardware configuration for laptop hardware - Include deployment script for little-rascal - Update flake.nix to include little-rascal as build target - Add deploy-rs configuration for little-rascal deployment The little-rascal laptop is now fully integrated into the Home Lab infrastructure with complete NixOS configuration management.
This commit is contained in:
parent
f42bae513c
commit
3715e542b2
6 changed files with 355 additions and 46 deletions
|
@ -1,6 +1,5 @@
|
|||
# Little Rascal - Development Laptop Configuration
|
||||
# Based on congenital-optimist with laptop-specific adjustments
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
|
@ -11,38 +10,39 @@
|
|||
}: {
|
||||
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/cosmic.nix
|
||||
../../modules/desktop/fonts.nix
|
||||
|
||||
# Development
|
||||
|
||||
# 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
|
||||
];
|
||||
|
@ -50,26 +50,26 @@
|
|||
networking = {
|
||||
hostName = "little-rascal";
|
||||
networkmanager.enable = true;
|
||||
|
||||
|
||||
# Tailscale for home lab access
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [ 41641 ]; # Tailscale
|
||||
allowedTCPPorts = [ 22 ]; # SSH
|
||||
allowedUDPPorts = [41641]; # Tailscale
|
||||
allowedTCPPorts = [22]; # SSH
|
||||
};
|
||||
};
|
||||
|
||||
# Boot configuration
|
||||
# Boot configuration
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-amd" "zram" ];
|
||||
|
||||
kernelModules = ["kvm-amd" "zram"];
|
||||
tmp.cleanOnBoot = true;
|
||||
|
||||
|
||||
# zram swap like other machines
|
||||
kernel.sysctl."vm.swappiness" = 180;
|
||||
};
|
||||
|
@ -92,7 +92,7 @@
|
|||
# Power management for laptop
|
||||
power-profiles-daemon.enable = true;
|
||||
upower.enable = true;
|
||||
|
||||
|
||||
# Display manager
|
||||
greetd = {
|
||||
enable = true;
|
||||
|
@ -103,12 +103,12 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Essential services
|
||||
tailscale.enable = true;
|
||||
blueman.enable = true;
|
||||
printing.enable = true;
|
||||
|
||||
|
||||
# Location services for time zone
|
||||
geoclue2.enable = true;
|
||||
};
|
||||
|
@ -123,4 +123,4 @@
|
|||
|
||||
# System version
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
# Hardware Configuration for Little Rascal
|
||||
# Lenovo Yoga Slim 7 14ARE05 - AMD Ryzen 7 4700U
|
||||
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
@ -18,25 +21,25 @@
|
|||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
kernelModules = [];
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-amd" ]; # AMD Ryzen system
|
||||
extraModulePackages = [ ];
|
||||
|
||||
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";
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/REPLACE-WITH-BOOT-UUID";
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -50,27 +53,27 @@
|
|||
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
|
||||
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;
|
||||
|
@ -89,7 +92,7 @@
|
|||
networking = {
|
||||
# Enable NetworkManager for WiFi management
|
||||
networkmanager.enable = true;
|
||||
|
||||
|
||||
# Disable wpa_supplicant (using NetworkManager)
|
||||
wireless.enable = false;
|
||||
};
|
||||
|
@ -122,4 +125,4 @@
|
|||
# - Intel Wi-Fi 6 AX200 + Bluetooth
|
||||
# - 128GB SSD storage
|
||||
# - Currently running btrfs filesystem
|
||||
}
|
||||
}
|
||||
|
|
107
machines/little-rascal/minimal-configuration.nix
Normal file
107
machines/little-rascal/minimal-configuration.nix
Normal file
|
@ -0,0 +1,107 @@
|
|||
# Minimal NixOS Configuration for little-rascal
|
||||
# This is for initial installation - use deploy-rs to apply full config afterwards
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Enable flakes for configuration deployment
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Boot configuration
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
# Import hardware scan results
|
||||
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod"];
|
||||
kernelModules = ["kvm-amd"];
|
||||
|
||||
# Clean tmp on boot
|
||||
tmp.cleanOnBoot = true;
|
||||
};
|
||||
|
||||
# Minimal file systems - you'll need to adjust this based on your disk setup
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
# Basic networking
|
||||
networking = {
|
||||
hostName = "little-rascal";
|
||||
networkmanager.enable = true;
|
||||
|
||||
# Open SSH port
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [22];
|
||||
allowedUDPPorts = [41641]; # Tailscale
|
||||
};
|
||||
};
|
||||
|
||||
# Essential services
|
||||
services = {
|
||||
# SSH for remote deployment
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PubkeyAuthentication = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Tailscale for secure home lab access
|
||||
tailscale.enable = true;
|
||||
};
|
||||
|
||||
# Create admin user for deployment
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
root = {
|
||||
# Add your SSH public key here for initial access
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPgzKS1N7+7+N1/8U8++1pl4hapDm6TOy0QhrfrYA8mz geir@geokkjer.eu-admin" # Admin key
|
||||
];
|
||||
};
|
||||
|
||||
geir = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "networkmanager" "sudo"];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHukJK0Kc1YexvzF8PdqaqWNZdVffGoM6ePPMecrU6dM geir@geokkjer.eu-dev" # Dev key
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPgzKS1N7+7+N1/8U8++1pl4hapDm6TOy0QhrfrYA8mz geir@geokkjer.eu-admin" # Admin key for backup access
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Sudo configuration
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
wheelNeedsPassword = false;
|
||||
};
|
||||
|
||||
# Basic packages for system management
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
htop
|
||||
curl
|
||||
wget
|
||||
];
|
||||
# System version
|
||||
system.stateVersion = "25.05";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue