Skip to content

Sincide/nixos-config

Repository files navigation

NixOS Configuration

This repository contains my personal NixOS setup supporting both Hyprland and Niri window managers. The configuration is packaged as a flake so it can be reused on multiple machines with minimal changes.

Features

  • Dual window manager support – Choose between Hyprland or Niri (both enabled by default).
  • Hyprland desktop with Waybar, Kitty and Rofi enabled by default.
  • Niri compositor with scrollable tiling and pre-configured keybindings.
  • Dynamic theming generated by Matugen and applied to Kitty, Waybar, Rofi, Hyprland and Dunst.
  • Wallpaper daemon swww started automatically as a user service.
  • Dotfile modules for Hyprland, Waybar, Kitty, Rofi, Dunst, Niri and Swappy.
  • Automatic host discovery – any directory under hosts/ becomes a build target.
  • Pre‑commit hook checks that every host has a hardware-configuration.nix file.

Quick start

  1. Clone the repository

    git clone https://github.com/sadjow/nixos-config.git ~/nixos-config
    cd ~/nixos-config
  2. Create a host directory named after your machine and copy the example configuration

    mkdir hosts/<hostname>
    cp hosts/nixos/configuration.nix hosts/<hostname>/
  3. Generate and commit the hardware configuration

    sudo nixos-generate-config --show-hardware-config > hosts/<hostname>/hardware-configuration.nix
    git add hosts/<hostname>/hardware-configuration.nix
    git commit -m "Add hardware configuration"
  4. Set your username Edit flake.nix and change the username variable from martin to your login name. Update your Git name and email in home.nix.

  5. Enable the pre‑commit hook (optional but recommended)

    git config core.hooksPath .githooks
  6. Build and activate the system

    sudo nixos-rebuild switch --flake .#<hostname>
  7. Choose your window manager Both Hyprland and Niri are enabled by default. At login, select your preferred compositor from the display manager. To disable one:

    • Edit hosts/<hostname>/configuration.nix and set programs.hyprland.enable = false; or programs.niri.enable = false;
    • Edit home.nix and set modules.hyprland.enable = false; or modules.niri.enable = false;
  8. Install example wallpapers (optional)

    ./setup-wallpapers.sh

    Once logged in you can press Super+W to choose a wallpaper and regenerate the theme.

Repository layout

flake.nix      # main flake definition
home.nix       # Home‑Manager configuration
hosts/         # one directory per machine
modules/       # optional dotfile modules
scripts/       # helper scripts and git hooks
templates/     # Matugen color templates

The wallpaper selector script in wallpaper-selector lists images from ~/Pictures/Wallpapers and sets the selected file using swww and Matugen.

Customisation

Most day‑to‑day changes are done through the following files:

  • home.nix – add extra packages or shell aliases.
  • hosts/<hostname>/configuration.nix – machine specific options.
  • dotfiles/ – actual configuration files for Hyprland, Niri, Waybar, Kitty and more.

Documentation

  • docs/customization.md – Detailed walkthrough of configuration options
  • docs/window-managers.md – Complete guide to Hyprland vs Niri
  • docs/changes.md – Recent changes and improvements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors