home-lab/machines/sleeper-service/configuration.nix
Geir Okkenhaug Jerstad 7c650856f2
Some checks are pending
🏠 Home Lab CI/CD Pipeline / 🔍 Validate Configuration (push) Waiting to run
🏠 Home Lab CI/CD Pipeline / 🔨 Build Configurations (push) Blocked by required conditions
🏠 Home Lab CI/CD Pipeline / 🔒 Security Audit (push) Blocked by required conditions
🏠 Home Lab CI/CD Pipeline / 📚 Documentation & Modules (push) Blocked by required conditions
🏠 Home Lab CI/CD Pipeline / 🔄 Update Dependencies (push) Waiting to run
🏠 Home Lab CI/CD Pipeline / 🚀 Deploy Configuration (push) Blocked by required conditions
🏠 Home Lab CI/CD Pipeline / 📢 Notify Results (push) Blocked by required conditions
feat: Complete sleeper-service deployment with ZFS and network fixes
 Major deployment milestone achieved:

**sleeper-service Configuration:**
- Successfully deployed flake-based NixOS on Intel Xeon file server
- Resolved ZFS mounting conflicts causing boot failures
- Implemented ZFS native mounting (/mnt/storage, /mnt/storage/media)
- Added Pi-hole DNS integration (10.0.0.14) for package resolution
- Configured systemd-networkd with static IP (10.0.0.8)
- System boots cleanly in ~1 minute with ZFS auto-mounting

**Infrastructure Updates:**
- SSH key management deployed and operational
- Network configuration with multi-tier DNS (Pi-hole, router, Google)
- NFS server configuration for network storage
- Data preservation verified: 903GB ZFS pool intact

**Technical Solutions:**
- Added nomodeset kernel parameter for graphics compatibility
- Disabled NVIDIA drivers for headless server operation
- Removed conflicting ZFS entries from hardware-configuration.nix
- Established remote deployment workflow via rsync + SSH

**Documentation:**
- Updated plan.md with deployment status and lessons learned
- Added deployment commands and troubleshooting notes
- Documented ZFS native mounting migration process

**Data Verified:**
- Films: 184GB, Series: 612GB, Audiobooks: 94GB, Music: 9.1GB, Books: 3.5GB
- Storage pool: 903GB used, 896GB available
- All media accessible via proper ZFS auto-mounting

This represents the first successful multi-machine flake deployment in the home lab infrastructure migration.
2025-06-06 11:21:12 +02:00

95 lines
No EOL
2.6 KiB
Nix

{ config, lib, pkgs, inputs, unstable, ... }: {
imports = [
./hardware-configuration.nix
# Security modules
../../modules/security/ssh-keys.nix
# Network configuration
../../modules/network/network-sleeper-service.nix
# Services
../../modules/services/nfs.nix
../../modules/system/transmission.nix
# User modules - server only needs sma user
../../modules/users/sma.nix
];
# Boot configuration with ZFS support
boot.loader.grub = {
enable = true;
zfsSupport = true;
efiSupport = true;
efiInstallAsRemovable = true;
mirroredBoots = [
{ devices = [ "nodev" ]; path = "/boot"; } ];
};
boot.supportedFilesystems = [ "zfs" ];
boot.loader.grub.memtest86.enable = true;
# Add nomodeset for graphics compatibility
boot.kernelParams = [ "nomodeset" ];
# ZFS services for file server
services.zfs = {
autoScrub.enable = true;
trim.enable = true;
};
# Enable ZFS auto-mounting since we're using ZFS native mountpoints
# systemd.services.zfs-mount.enable = lib.mkForce false;
# Disable graphics for server use - comment out NVIDIA config for now
# hardware.graphics = {
# enable = true;
# };
# hardware.nvidia = {
# modesetting.enable = true;
# open = false;
# package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
# };
# Comment out NVIDIA kernel modules for now
# boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
# Comment out NVIDIA utilities for now
# environment.systemPackages = with pkgs; [
# config.boot.kernelPackages.nvidiaPackages.legacy_470
# ];
# Create mount directories early in boot process
systemd.tmpfiles.rules = [
"d /mnt/storage 0755 root root -"
"d /mnt/storage/media 0755 root root -"
];
# Network configuration - using working setup from old config
# networking.hostName = "sleeper-service";
# services.tailscale.enable = true;
# networking.networkmanager.enable = true;
# networking.hostId = "8425e349";
# Time and locale
time.timeZone = "Europe/Oslo";
i18n.defaultLocale = "en_US.UTF-8";
# Console configuration
console = {
font = "Lat2-Terminus16";
keyMap = "no";
};
# Enable unfree packages
nixpkgs.config.allowUnfree = true;
# nixpkgs.config.nvidia.acceptLicense = true; # Commented out for now
programs.zsh.enable = true;
# Enable SSH
services.openssh.enable = true;
# Firewall configuration - disable for simplicity like old config
# networking.firewall.enable = false;
# DO NOT CHANGE - maintains data compatibility
system.stateVersion = "23.11";
}