Nix MIT

NixOS

NixOS + Hyprland rice with flakes, home-manager and dev-shells

S

Sly-Harvey

Dernière activité 27 sept. 2026
Sly-Harvey/NixOS

608

étoiles

56

forks

0

issues ouvertes

dotfilesflakeflakeshome-managerlinuxnixnix-flakenix-flakesnixosnixos-confignixos-configurationnixos-dotfilesnixos-modulenixos-modules

Ce README est souvent en anglais.


My NixOS Configuration

Screenshots

Screenshot Screenshot

More screenshots

Screenshot Screenshot Screenshot

Table of Contents

Installation

Note

Before proceeding with the installation, check these files and adjust them for your system:

  • hosts/Default/variables.nix: Contains host-specific variables.
  • hosts/Default/host-packages.nix: Lists installed packages for the host.
  • hosts/Default/configuration.nix: Module imports for the host and extra configuration.

You can install on a running system or from the NixOS live installer. Get the minimal ISO from the NixOS website.

Installation Steps

  1. Clone the Repository:
git clone https://github.com/Sly-Harvey/NixOS.git ~/NixOS
  1. Change Directory:
cd ~/NixOS
  1. Run the Installer:
./install.sh

The install and rebuild scripts automate the setup process, including hosts, username, and applying the configuration. It also automatically generates the hardware-configuration.nix file based on your system's detected hardware, eliminating the need to manually generate it.

Usage

Managing Hosts

Method 1: Automatic - run the installer again to select or create another host:

./install.sh

Method 2: Manual:

  1. Copy hosts/Default to a new directory (e.g., hosts/Laptop)

  2. Edit the new host's variables.nix and host-packages.nix

  3. Add the host to flake.nix:

    nixosConfigurations = {
      Default = mkHost "Default";
      Laptop = mkHost "Laptop";
    };
  4. Track the new host with git:

    git add hosts/Laptop
  1. Rebuild with the new hostname using either nixos-rebuild or nh (see Rebuilding below). Once rebuilt, you can use either the shortcut or rebuild command, as the host name will be implicitly recognised.

Rebuilding

Apply configuration changes:

  • Keyboard shortcut: Super + U
  • rebuild script: rebuild
  • nixos-rebuild: sudo nixos-rebuild switch --flake ~/NixOS#<HOST>
  • nh: nh os switch --hostname <HOST>

Replace <HOST> with the name of your host (e.g., Laptop).

Rollbacks

List generations:

list-gens

Rollback to generation N:

rollback N

Replace N with the generation number (e.g., 69).

Keybindings

View all keybindings with Super + ? or Super + Ctrl + K.

Development Shells

Pre-configured dev shells for various languages are included.

Initialize a project from a template:

nix flake init -t ~/NixOS#<TEMPLATE_NAME>

Or create a new project directory:

nix flake new -t ~/NixOS#<TEMPLATE_NAME> <PROJECT_NAME>

Templates are defined in dev-shells/default.nix (python, node, etc.).

Enter the shell:

cd <PROJECT_NAME>
nix develop

If you're using direnv, direnv allow can be used to activate the shell automatically when entering the directory.

Credits/Inspiration

Credit Reason
Hyprland-Dots Scripts and Waybar templates
HyDE Additional scripts
rofi Rofi launcher styles
dev-templates Development templates
Vimjoyer NixOS tutorials

Projets similaires

❄️ NixOs / Hyprland rice with Home-Manager ❄️

Nixdotfilesflakesgruvbox
FFrost-Phoenix
940 étoiles87

Simple and documented config templates to help you get started with NixOS + home-manager + flakes. All the boilerplate you need!

Nixdotfilesflakeshome-manager
MMisterio77
3,8 k étoiles176

My Personal Nix, NixOS and Nix-Darwin System Configuration Flake

Nixdotfilesflakehome-manager
MMatthiasBenaets
741 étoiles65