Something went wrong. Try again.
Something went wrong. Try again.
Files
- Nix 95%
- Python 5%
README.md
NixOS Configuration #
Personal NixOS configuration using Flakes, Home Manager, and flake-parts.
Structure #
nixconfig/
├── flake.nix # Main flake entry point
├── flake-modules/ # Flake-parts modules (see flake-modules/README.md)
├── hosts/ # Per-host configurations
│ ├── nimeses/
│ │ ├── default.nix # NixOS system config
│ │ ├── nimeses.nix # Home Manager config
│ │ └── hardware-configuration.nix
│ └── prometheus/
│ ├── default.nix # NixOS system config
│ ├── prometheus.nix # Home Manager config
│ └── hardware-configuration.nix
├── home/ # Home Manager modules (my.user.*)
│ ├── base.nix
│ ├── desktop/
│ └── development/
├── profiles/ # NixOS system profiles (core, laptop, desktop, gaming, etc.)
├── lib/ # Custom library functions
├── devShells/ # Development environments
├── overlays/ # Nixpkgs overlays
└── assets/ # Icons, wallpapers, themes
Installation #
First-time installation on a new machine #
-
Clone the repository:
git clone https://github.com/N1meses/nixconfig /etc/nixos/nixconfig cd /etc/nixos/nixconfig -
Generate and move hardware configuration:
mkdir -p hosts/<hostname> nixos-generate-config --show-hardware-config > hosts/<hostname>/hardware-configuration.nix -
Register host in
flake-modules/hosts.nix:hosts.<hostname> = { username = "your-username"; hostname = "<hostname>"; }; -
Create host configurations:
hosts/<hostname>/default.nix(NixOS system config)hosts/<hostname>/<hostname>.nix(Home Manager config)
-
Uncomment host in:
flake-modules/nixos-configurations.nixflake-modules/home-configurations.nix
-
Rebuild with experimental features enabled:
nixos-rebuild switch --flake .#<hostname> --extra-experimental-features "nix-command flakes" -
(Optional) Enable experimental features permanently:
mkdir -p /etc/nix echo "experimental-features = nix-command flakes" >> /etc/nix/nix.confAfter this, future rebuilds just need:
nixos-rebuild switch --flake .#<hostname>
Adding a Host #
- Create
hosts/<hostname>/directory withhardware-configuration.nix - Register in
flake-modules/hosts.nix - Create
default.nix(system) and<hostname>.nix(home) - Uncomment in
flake-modules/nixos-configurations.nixandflake-modules/home-configurations.nix - Rebuild:
sudo nixos-rebuild switch --flake .#<hostname>
Basic Commands #
System #
sudo nixos-rebuild switch --flake .#nimeses
sudo nixos-rebuild test --flake .#nimeses
Home Manager #
home-manager switch --flake .#nimeses
Development Shells #
nix develop .#python
nix develop .#java
nix develop .#rust
nix develop .#django
Maintenance #
nix flake update # Update inputs
nix flake check # Check for errors
nix flake show # Show outputs
nix fmt # Format with alejandra
nix-collect-garbage -d # Clean old generations
Module System #
Configuration uses custom namespaces:
my.user.*for Home Manager user configuration- System configuration uses profiles in
profiles/(core, laptop, desktop, gaming, server, etc.)
Compositors #
- Hyprland - Dynamic tiling Wayland compositor
- Niri - Scrollable-tiling Wayland compositor
- MangoWC - Master-stack tiling Wayland compositor
- Noctalia - Shell interface (bar, launcher, control center)
All compositors share unified configuration (monitors, appearance, keybindings) with consistent Emerald Green color scheme.
Keybindings #
Super + Return- TerminalSuper + E- File managerSuper + M- LauncherSuper + Q- Close windowSuper + H/J/K/L- Navigate (vim-style)Super + 1-9- Switch workspace
Documentation #
- flake-modules/README.md - Flake-parts organization
- devShells/README.md - Development environments