Skip to content

Beautiful NixOS desktop with Niri compositor and Noctilia Shell

License

Notifications You must be signed in to change notification settings

JulianPasco/nocturi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

55 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Niri + Noctilia + NixOS

A modern, beautiful, and performant NixOS desktop configuration featuring Niri's scrollable-tiling compositor and Noctilia Shell's stunning interface.

NixOS Niri Noctilia

✨ Features

  • 🎨 Beautiful by Default: Noctilia Shell with Ayu theme
  • πŸͺŸ Unique Window Management: Niri's scrollable-tiling compositor
  • ⚑ Blazing Fast: zram swap, tmpfs caching, optimized VM settings
  • πŸ”’ Secure: Wayland-native, no X11, proper portal configuration
  • πŸ“¦ Reproducible: NixOS flakes ensure identical setups across machines
  • 🧩 DRY Architecture: Shared base config, host-specific overrides only
  • βš™οΈ Easy Customization: Single user-config.nix file for personal settings

πŸŽ₯ What You Get

Niri Compositor

  • Scrollable-tiling window management (Super+H/L to scroll)
  • Smooth 60fps animations
  • Per-monitor workspaces
  • Dynamic workspace creation
  • Native Wayland, no X11 dependencies

Noctilia Shell

  • Stunning desktop shell with widgets
  • App launcher with fuzzy search
  • Control center with power profiles
  • Lock screen that matches your theme
  • System monitor, calendar, weather
  • Media controls and notifications

Performance Optimizations

  • zram: 50% RAM compressed swap
  • tmpfs: 3GB in-memory cache
  • VM tuning: Optimized swappiness and dirty ratios
  • Nix caching: Fast rebuilds with parallel builds
  • Auto GC: Weekly cleanup of old generations

Included Applications

  • Development: VSCode, Windsurf, GitHub Desktop
  • Browsers: Google Chrome, Firefox
  • Office: OnlyOffice, Impression (presentations)
  • Communication: Telegram, Zapzap (WhatsApp)
  • Cloud: Nextcloud client
  • Security: Bitwarden
  • Remote: AnyDesk, Deskflow (KVM)
  • Media: MPV, Pavucontrol
  • File Management: Nautilus, FileZilla
  • System: htop, btop, neofetch

See home/default.nix for complete list.

πŸ“¦ Quick Start

Note: These instructions are for a fresh NixOS installation. Just copy and paste each command!


Step 1: Open the NixOS configuration file

sudo nano /etc/nixos/configuration.nix

Step 2: Add git and enable flakes

Find a spot in the file and add these two lines:

environment.systemPackages = [ pkgs.git ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];

Then save the file: Press Ctrl+O, then Enter, then Ctrl+X


Step 3: Apply the changes

sudo nixos-rebuild switch

Step 4: Clone the repository

git clone https://github.com/JulianPasco/nocturi.git ~/nixos-config

Step 5: Edit your personal settings

nano ~/nixos-config/user-config.nix

Update these values with your information:

  • username - Your Linux username
  • fullName - Your name
  • email - Your email
  • timezone - Your timezone (e.g., "Europe/London", "America/New_York")
  • locale - Your locale (e.g., "en_US.UTF-8")

Save: Press Ctrl+O, then Enter, then Ctrl+X


Step 6: Copy your hardware configuration

For desktop/work machine:

cp -a /etc/nixos/hardware-configuration.nix ~/nixos-config/hosts/work/

For laptop/home machine:

cp -a /etc/nixos/hardware-configuration.nix ~/nixos-config/hosts/home/

Step 7: Deploy!

For desktop/work:

sudo nixos-rebuild switch --flake ~/nixos-config#work

For laptop/home:

sudo nixos-rebuild switch --flake ~/nixos-config#home

Step 8: Reboot

sudo reboot

βœ… Done! After reboot, log in at the terminal and Niri will start automatically.

⌨️ Keybindings

Key Action
Super+T Terminal (Kitty)
Super+D / Super+Space Launcher
Super+Escape Lock screen
Super+Q Close window
Super+H/L Scroll workspaces
Super+Shift+H/L Move window between workspaces
Super+Left/Right/Up/Down Focus window

See home/default.nix for complete list.

πŸ“‚ Structure

β”œβ”€β”€ flake.nix                    # Flake configuration
β”œβ”€β”€ user-config.nix              # ⭐ YOUR PERSONAL SETTINGS (edit this!)
β”œβ”€β”€ modules/
β”‚   β”œβ”€β”€ base/                    # Shared config for all hosts
β”‚   β”œβ”€β”€ home/                    # Noctilia Shell config
β”‚   └── system/                  # Niri system integration
β”œβ”€β”€ hosts/
β”‚   β”œβ”€β”€ home/                    # Laptop config (bluetooth, battery)
β”‚   └── work/                    # Desktop config
└── home/                        # User packages and settings

Configuration Points

Personal settings: user-config.nix ⭐ Edit this first! (username, timezone, location, etc.)

System-wide changes: modules/base/default.nix (applies to all hosts)

Host-specific: hosts/{hostname}/configuration.nix (overrides for single machine)

User interface: modules/home/noctilia.nix (Noctilia appearance - advanced)

User apps: home/default.nix (packages and home-manager settings)

🎨 Customization

Change Theme

Edit modules/home/noctilia.nix:

colorSchemes.predefinedScheme = "Ayu";  # or "Catppuccin", "TokyoNight", etc.

Change Wallpapers

Place images in ~/Pictures/Wallpapers/ and they'll rotate automatically (or set automationEnabled = false for static).

Add Packages

Edit home/default.nix and add to home.packages:

home.packages = with pkgs; [
  your-package-here
];

Change Power Profile

Default is powersaver. To change, edit modules/home/noctilia.nix:

startup = "noctalia-shell ipc call powerProfile set performance";

πŸš€ Adding Another Machine

  1. Clone repo on new machine
  2. Generate hardware config: sudo nixos-generate-config --show-hardware-config > /tmp/hw.nix
  3. Create hosts/newhost/ directory
  4. Copy hardware config there
  5. Create hosts/newhost/configuration.nix (use hosts/work as template)
  6. Add to flake.nix:
nixosConfigurations = {
  newhost = mkHost "newhost" [];
};
  1. Deploy: sudo nixos-rebuild switch --flake .#newhost

πŸ”„ Updating

Pull Latest Changes from GitHub

When there are new updates to the config, run these commands:

cd ~/nixos-config
git pull
sudo nixos-rebuild switch --flake ~/nixos-config#work

Tip: Replace #work with #home if you're on a laptop.


Update System Packages

This updates NixOS packages, Niri, and Noctilia to their latest versions:

cd ~/nixos-config
nix flake update
sudo nixos-rebuild switch --flake ~/nixos-config#work

Note: If you get a "Permission denied" error on flake.lock, fix ownership with:

sudo chown -R $USER:users ~/nixos-config

Rollback if Something Breaks

sudo nixos-rebuild switch --rollback

Or select a previous generation from the boot menu.

πŸ”§ Features

  • βœ… TTY auto-login to Niri (no display manager overhead)
  • βœ… Wayland-native (no X11)
  • βœ… XDG portals configured (screen sharing works)
  • βœ… PipeWire audio
  • βœ… Power management (battery, power profiles)
  • βœ… Bluetooth support (on laptop)
  • βœ… Calendar and weather integration
  • βœ… Tailscale VPN
  • βœ… Firefox with Wayland
  • βœ… Automatic Nix store optimization
  • βœ… Weekly garbage collection

🀝 Contributing

Found a bug or want to improve something? PRs welcome!

πŸ“ License

MIT License - feel free to use and modify.

πŸ™ Credits

  • Niri - Scrollable-tiling Wayland compositor
  • Noctilia Shell - Beautiful desktop shell
  • NixOS - Declarative Linux distribution

Enjoy your beautiful, fast, and reproducible desktop! ⭐

About

Beautiful NixOS desktop with Niri compositor and Noctilia Shell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages