Skip to content

LFTPadilla/nixos-dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NixOS Dotfiles - Complete System Configuration

A complete NixOS system configuration with GNOME desktop, development tools, and Home Manager integration.

πŸš€ Quick Installation (New Computer)

Prerequisites

  1. Fresh NixOS installation with internet connection
  2. Git installed: nix-shell -p git

Installation Steps

# 1. Clone the repository
git clone https://github.com/LFTPadilla/nixos.git ~/.dotfiles

# 2. Navigate to system directory
cd ~/.dotfiles/system

# 3. Test the configuration
sudo nixos-rebuild test --flake .#default

# 4. If successful, apply permanently
sudo nixos-rebuild switch --flake .#default

# 5. Reboot to ensure all services start correctly
reboot

πŸ“‹ What You Need to Backup/Restore

Essential Files (CRITICAL - Store in secure cloud backup)

~/.ssh/                     # SSH keys and known_hosts
~/.gnupg/                   # GPG keys and configuration
~/.netrc                    # Network authentication credentials
~/.profile                  # User environment variables
~/.npmrc                    # npm configuration and registry tokens

Application Data (Important but can be recreated)

~/.config/1Password/        # 1Password vault cache
~/.config/Claude/           # Claude AI conversation history
~/.config/BraveSoftware/    # Browser bookmarks and settings
~/.config/Code/             # VS Code settings and extensions
~/.config/chromium/         # Chromium browser data
~/.config/Bitwarden/        # Password manager data

Development Data (Version controlled separately)

~/programming/              # Your project repositories
~/Documents/                # Important documents
~/Nextcloud*/               # Cloud synced files

πŸ”§ System Features

Desktop Environment

  • GNOME with X11 (Wayland disabled for compatibility)
  • Custom theme switching (dark/light mode scripts)
  • Rofi launcher with multiple modes (apps, windows, emoji)
  • Flameshot for screenshots with annotation
  • Custom keybindings for productivity

Power Management

  • GUI Control: Settings β†’ Power β†’ Power Mode
  • Keyboard Shortcuts:
    • Super+Alt+1 β†’ Power Saver mode
    • Super+Alt+2 β†’ Balanced mode
    • Super+Alt+3 β†’ Performance mode
  • Terminal Commands: power-saver, balanced, performance

Development Tools

  • Languages: Node.js 22, Python 3, Docker support
  • Editors: Neovim (default), VS Code, Cursor
  • Shell: Zsh + Oh-My-Zsh + Starship prompt
  • Terminal: Kitty with Catppuccin theme
  • File Manager: Yazi with custom configuration
  • Version Control: Git with helpful aliases

System Services

  • Tailscale VPN for remote access
  • Sunshine game streaming server
  • Home Assistant Companion for automation
  • ActivityWatch for time tracking
  • Auto-cpufreq for power management

πŸ—οΈ Architecture Overview

Core Files

system/
β”œβ”€β”€ flake.nix                 # Nix flake definition and inputs
β”œβ”€β”€ configuration.nix         # Main system configuration
β”œβ”€β”€ home.nix                 # Home Manager user configuration
β”œβ”€β”€ hardware-configuration.nix # Hardware-specific settings
└── packages/                # Package definitions
    β”œβ”€β”€ system.nix           # System-wide packages
    β”œβ”€β”€ user.nix             # User packages  
    β”œβ”€β”€ development.nix      # Development tools
    └── desktop.nix          # Desktop applications

Application Configs

system/applications/
β”œβ”€β”€ rofi/                    # Rofi launcher configuration
β”œβ”€β”€ sunshine.nix             # Game streaming setup
└── vm.nix                   # Virtual machine configuration

Scripts & Automation

system/scripts/
β”œβ”€β”€ translate.sh             # Quick translation tool
└── translate-selection.sh   # Translate selected text

users/felipe/homeassistant/
β”œβ”€β”€ *.sh                     # Power management scripts
└── hacompanion.toml         # Home Assistant config

βš™οΈ Customization

Adding New Packages

# System packages (requires rebuild)
# Edit system/packages/system.nix or user.nix

# User packages via Home Manager
# Edit system/packages/user.nix

# Then rebuild
rebuild-test    # Test first
rebuild         # Apply changes

Modifying Services

# Edit system/configuration.nix
# Add/modify services section

# Test and apply
sudo nixos-rebuild test --flake ~/.dotfiles/system#default
sudo nixos-rebuild switch --flake ~/.dotfiles/system#default

Updating System

# Update flake inputs
update-flake

# Rebuild with new packages
rebuild

πŸ”„ Maintenance Commands

Available Aliases

# System management
rebuild           # Apply configuration changes
rebuild-test      # Test configuration without switching
rebuild-boot      # Apply on next boot
update-flake      # Update all flake inputs

# Power management  
power-saver       # Switch to power saving mode
balanced          # Switch to balanced mode
performance       # Switch to performance mode
power-status      # Show current power profile

# Quick editing
edit-config       # Edit main system configuration
edit-home         # Edit Home Manager configuration
dot               # Navigate to dotfiles directory

# Theme switching
dark-theme        # Switch to dark theme
light-theme       # Switch to light theme

Regular Maintenance

# Weekly maintenance
nix-collect-garbage -d              # Clean old generations
sudo nixos-rebuild switch --upgrade # Update system

πŸ†˜ Troubleshooting

Boot Issues

# Roll back to previous generation
sudo nixos-rebuild switch --rollback

# Check available generations
sudo nix-env -p /nix/var/nix/profiles/system --list-generations

Build Errors

# Detailed error information
sudo nixos-rebuild switch --flake ~/.dotfiles/system#default --show-trace

# Check flake issues
nix flake check ~/.dotfiles/system/

Service Issues

# Check service status
systemctl status <service-name>

# View logs
journalctl -xeu <service-name>

# Restart service
sudo systemctl restart <service-name>

πŸ” Security Considerations

First Boot Setup

  1. Change default passwords for all accounts
  2. Set up SSH keys (generate new ones if lost)
  3. Configure GPG keys for signing commits
  4. Set up 1Password or password manager
  5. Configure Tailscale for secure remote access

Network Security

  • Firewall is enabled with specific port rules
  • SSH has rate limiting configured
  • VPN integration available (Tailscale, ProtonVPN)

πŸ“± Integrations

Home Assistant

  • Companion service runs automatically
  • Power management integration
  • System monitoring capabilities

Cloud Services

  • Nextcloud integration for file sync
  • GitHub integration for code repositories
  • Various cloud storage providers supported

🚨 Recovery Guide

Complete System Loss

  1. Fresh NixOS install with same username
  2. Restore SSH keys from backup to ~/.ssh/
  3. Clone dotfiles: git clone <your-repo> ~/.dotfiles
  4. Run installation steps above
  5. Restore application data from cloud backups
  6. Reconfigure services (Tailscale, 1Password, etc.)

Partial Recovery

  • Lost configs: git checkout to restore specific files
  • Broken build: Use --rollback to previous generation
  • Service issues: Check systemd logs and restart services

πŸ“š Additional Resources


Last Updated: $(date) NixOS Version: 25.05 (Unstable) Home Manager: Latest

For questions or issues, check the git history or create an issue in the repository.

About

🐧 Comprehensive NixOS system configuration with flakes, Home Manager, GNOME desktop, development tools, and Home Assistant integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors