Skip to content

My NixOS configuration using flakes with Hyprland, Home Manager, and modular structure.

Notifications You must be signed in to change notification settings

FinnPL/NixOS-Configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS Configuration

Test NixOS Configuration Evaluate NixOS Configuration

My NixOS configuration using flakes with Hyprland, Quickshell, Home Manager, and modular structure.

Overview

This repository contains a complete NixOS configuration featuring:

  • Hyprland - Modern Wayland compositor
  • Quickshell - Modern Qt6/QML-based desktop shell
  • Home Manager - Declarative user environment management
  • Stylix - System-wide theming with automatic Quickshell integration
  • Modular structure - Clean separation of concerns

Quick Start

Prerequisites

  • NixOS installed with flakes enabled
  • Git for cloning this repository
  • Ensure /usr/share/wallpaper/ exists and contains all wallpapers you want to use for theming

Installation

  1. Clone this repository:
git clone https://github.com/FinnPL/nixos-config /etc/nixos
cd /etc/nixos
  1. Deploy the configuration:
chmod +x deploy.sh
./deploy.sh
  1. To update flake inputs before deployment:
./deploy.sh -up

Changing Theme

To change the active theme, edit flake.nix and set activeTheme to your desired theme (e.g., themes.mytheme).

Architecture

Flake Structure

The configuration is built using Nix flakes with the following inputs:

  • nixpkgs - Latest unstable channel
  • home-manager - User environment management
  • firefox-addons - Firefox extensions via NUR
  • stylix - System-wide theming framework
  • hyprland - Wayland compositor and plugins

Directory Structure

├── flake.nix                    # Main flake configuration
├── flake.lock                   # Locked input versions
├── deploy.sh                    # Deployment script
├── hosts/                       # Host-specific configurations
│   └── centaur/
│       ├── configuration.nix    # System configuration
│       ├── hardware-configuration.nix  # Hardware settings
│       └── home.nix             # User configuration
├── modules/                     # Modular configurations
│   ├── home-manager/           # User-level modules
│   ├── hyprland/              # Hyprland-specific modules
│   ├── nixos/                 # System-level modules
│   └── quickshell/            # Quickshell desktop shell
└── none-nix/                   # Non-Nix configuration files

Module System

Home Manager Modules

Located in modules/home-manager/:

  • basics.nix - Essential packages and settings
  • cli-tools.nix - Command-line utilities
  • discord.nix - Discord configuration
  • firefox.nix - Firefox with extensions
  • jetbrains.nix - JetBrains IDE suite
  • kitty.nix - Terminal emulator configuration
  • python-packages.nix - Python development environment
  • thunderbird.nix - Email client
  • vscode.nix - Visual Studio Code setup
  • zsh.nix - Zsh shell configuration

Hyprland Modules

Located in modules/hyprland/:

  • default.nix - Main Hyprland configuration
  • hyprland-config.nix - Window manager settings
  • waybar.nix - Status bar configuration
  • rofi.nix - Application launcher
  • mako.nix - Notification daemon
  • hyprpaper.nix - Wallpaper management
  • cliphist.nix - Clipboard history

Quickshell Modules

Located in modules/quickshell/:

This is a complete Qt6/QML desktop shell based on illogical-impulse, featuring:

  • shell-config.nix - Main Quickshell configuration and Nix integration
  • generate-colors.py - Automatic Material Design color generation from Stylix theme
  • config/ - QML shell components including:
    • Bar - Status bar with system info, weather, workspaces
    • Overview - Window overview and app launcher
    • Sidebar - Notifications, calendar, quick toggles
    • Lock screen - Session lock with customizable clock widgets
    • On-screen display - Volume, brightness indicators
    • Notification popups - Desktop notifications
    • Session screen - Power/logout menu

Quickshell Features

  • Stylix Integration - Colors automatically generated from your theme
  • Declarative Config - All settings managed through Nix
  • Services - Weather, battery, audio, Bluetooth, network status, and more
  • Search - App launcher with math, web search, and file search capabilities

NixOS Modules

Located in modules/nixos/:

  • auto.nix - Automatic updates and cleanup
  • stylix-config.nix - System-wide theming

Maintenance

Automatic Maintenance

The configuration includes automatic maintenance via modules/nixos/auto.nix:

  • System updates: Weekly automatic updates
  • Garbage collection: Weekly cleanup of packages older than 10 days
  • Store optimization: Automatic Nix store optimization

Manual Maintenance

# Update flake inputs
nix flake update

# Garbage collect old generations
sudo nix-collect-garbage -d

# Optimize Nix store
sudo nix-store --optimize

Customization

Adding New Designs (Themes)

To add a new theme:

  1. Add your color scheme YAML file to modules/nixos/themes/ (e.g., mytheme.yaml).
  2. Add your wallpaper image to /usr/share/wallpaper/ (e.g., mytheme.jpg).
  3. Edit modules/nixos/themes/defaults.nix to include your new theme:
    mytheme = {
      colorScheme = ./mytheme.yaml;
      wallpaper = "mytheme.jpg";
    };

Changing Theme

To change the active theme, edit flake.nix and set activeTheme to your desired theme (e.g., themes.mytheme).

Adding New Modules

  1. Create module file in appropriate directory:

    • System modules: modules/nixos/
    • User modules: modules/home-manager/
    • Hyprland modules: modules/hyprland/
  2. Import in relevant configuration:

    • System: Add to hosts/centaur/configuration.nix
    • User: Add to hosts/centaur/home.nix

Host Configuration

To add a new host:

  1. Create directory: hosts/<hostname>/
  2. Add required files:
    • configuration.nix
    • hardware-configuration.nix
    • home.nix
  3. Update flake.nix to include new host

About

My NixOS configuration using flakes with Hyprland, Home Manager, and modular structure.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published