nixos-configuration  by LongerHV

NixOS configuration management

created 2 years ago
294 stars

Top 90.9% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a personal NixOS configuration, designed for users who want to manage their system declaratively. It offers a reproducible setup for NixOS and can also be used to bootstrap Nix and Home Manager on non-NixOS systems like Ubuntu.

How It Works

The configuration leverages Nix flakes for managing dependencies and system state. It uses Home Manager to manage user-specific configurations, including dotfiles and installed packages, ensuring a consistent user environment across different machines. The NixOS configuration itself defines system-level settings, services, and packages.

Quick Start & Requirements

  • NixOS Installation:
    # As root
    HOST=<your-host-name> nix-shell
    git clone https://this.repo.url/ /etc/nixos
    cd /etc/nixos
    nixos-install --root /mnt --impure --flake .#$HOST
    
  • Non-NixOS (Ubuntu) Bootstrap:
    # Install git, curl, xz
    sudo apt install git xz-utils curl
    git clone https://gitlab.com/LongerHV/nixos-configuration.git
    cd nixos-configuration
    # Install Nix (single-user)
    sh <(curl -L https://nixos.org/nix/install) --no-daemon
    # Activate Nix profile
    . ~/.nix-profile/etc/profile.d/nix.sh
    echo ". $HOME/.nix-profile/etc/profile.d/nix.sh" >> ~/.profile
    echo ". $HOME/.nix-profile/etc/profile.d/nix.sh" >> ~/.zprofile
    # Open shell with nix and home-manager
    nix-shell
    # Remove system nix to avoid conflicts
    nix-env -e nix
    # Install configuration
    home-manager switch --flake .#mmieszczak
    # Set zsh as default shell
    echo ~/.nix-profile/bin/zsh | sudo tee -a /etc/shells
    usermod -s ~/.nix-profile/bin/zsh $USER
    
  • Prerequisites: Git, curl, xz-utils. Nix installation is handled by the script.
  • Resources: NixOS Manual, Home-manager Docs

Highlighted Details

  • Supports NixOS system configuration and Home Manager for dotfiles.
  • Includes steps for bootstrapping Nix and Home Manager on Ubuntu.
  • Provides a template for building NixOS ISO images.

Maintenance & Community

This appears to be a personal configuration repository. No specific community links or maintenance signals are provided in the README.

Licensing & Compatibility

The README does not explicitly state a license. The presence of Nix and Home Manager suggests compatibility with their respective licenses. Commercial use would require careful review of any underlying licenses.

Limitations & Caveats

The configuration is tailored for specific user accounts (mmieszczak) and hostnames ($HOST), requiring modification for general use. The Ubuntu bootstrap process involves removing the system-installed Nix, which might be undesirable in some environments.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
19 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.