My configuration is becoming more and more complex, and it will be difficult for beginners to read. If you are new to NixOS and want to know how I use NixOS, I would recommend you to take a look at the ryan4yin/nix-config/releases first, checkout to some simpler older versions, such as i3-kickstarter, which will be much easier to understand.
This repository is home to the nix code that builds my systems:
- NixOS Desktops: NixOS with home-manager, hyprland, agenix, etc.
- macOS Desktops: nix-darwin with home-manager, share the same home-manager configuration with NixOS Desktops.
- NixOS Servers: virtual machines running on Proxmox/KubeVirt, with various services, such as kubernetes, homepage, prometheus, grafana, etc.
See ./hosts for details of each host.
See ./Virtual-Machine.md for details of how to create & manage KubeVirt's Virtual Machine from this flake.
Nix allows for easy-to-manage, collaborative, reproducible deployments. This means that once something is setup and configured once, it works (almost) forever. If someone else shares their configuration, anyone else can just use it (if you really understand what you're copying/refering now).
As for Flakes, refer to Introduction to Flakes - NixOS & Nix Flakes Book
Want to know NixOS & Flaks in detail? Looking for a beginner-friendly tutorial or best practices? You don't have to go through the pain I've experienced again! Check out my NixOS & Nix Flakes Book - 🛠️ ❤️ An unofficial & opinionated 📖 for beginners!
If you're using macOS, check out ryan4yin/nix-darwin-kickstarter for a quick start.
NixOS(Wayland) | |
---|---|
Window Manager | Hyprland |
Terminal Emulator | Zellij + Kitty |
Bar | Waybar |
Application Launcher | anyrun |
Notification Daemon | Mako |
Display Manager | GDM |
Color Scheme | Catppuccin |
network management tool | NetworkManager |
Input method framework | Fcitx5 |
System resource monitor | Btop |
File Manager | Yazi + thunar |
Shell | Nushell + Starship |
Music Player | mpd, ncmpcpp, mpc |
Media Player | mpv |
Text Editor | Neovim + DoomEmacs |
Fonts | Nerd fonts |
Image Viewer | imv |
Screenshot Software | flameshot + grim |
Screen Recording | OBS |
Filesystem & Encryption | tmpfs on / , Btrfs subvolumes on a LUKS encrypted partition for persistent, unlock via passphrase |
Secure Boot | lanzaboote |
Wallpapers: https://github.com/ryan4yin/wallpapers
See ./home/base/tui/editors/neovim/ for details.
See ./home/base/tui/editors/emacs/ for details.
See ./secrets for details.
🔴 IMPORTANT: You should NOT deploy this flake directly on your machine ❗ It will not succeed. This flake contains my hardware configuration(such as hardware-configuration.nix, Nvidia Support, etc.) which is not suitable for your hardwares, and requires my private secrets repository ryan4yin/nix-secrets to deploy. You may use this repo as a reference to build your own configuration.
For NixOS:
To deploy this flake from NixOS's official ISO image(purest installation method), please refer to ./nixos-installer/
Need to restart the machine when switching between
wayland
andxorg
.
# deploy one of the configuration based on the hostname
sudo nixos-rebuild switch --flake .#ai-hyprland
# deploy via `just`(a command runner with similar syntax to make) & Justfile
just hypr # deploy my pc with hyprland compositor
# or we can deploy with details
just hypr debug
For macOS:
# If you are deploying for the first time,
# 1. install nix & homebrew manually.
# 2. prepare the deployment environment with essential packages available
nix-shell -p just nushell
# 3. comment home-manager's code in lib/macosSystem.nix to speed up the first deplyment.
# 4. comment out the proxy settings in scripts/darwin_set_proxy.py if the proxy is not ready yet.
# 4. deploy harmonica's configuration(macOS Intel)
just ha
# deploy fern's configuration(Apple Silicon)
just fe
# deploy with details
just ha debug
# just fe debug
What y'all will need when Nix drives you to drink. (copy from hlissner's dotfiles, it really matches my feelings when I first started using NixOS...)
Other dotfiles that inspired me:
- Nix Flakes
- NixOS-CN/NixOS-CN-telegram
- notusknot/dotfiles-nix
- xddxdd/nixos-config
- bobbbay/dotfiles
- gytis-ivaskevicius/nixfiles
- davidtwco/veritas
- gvolpe/nix-config
- Ruixi-rebirth/flakes
- fufexan/dotfiles: gtk theme, xdg, git, media, anyrun, etc.
- nix-community/srvos: a collection of opinionated and sharable NixOS configurations for servers
- Modularized NixOS Configuration
- Hyprland(wayland)
- notwidow/hyprland: This is where I start my hyprland journey.
- HeinzDev/Hyprland-dotfiles: Refer to the waybar configuration here.
- linuxmobile/kaku
- Neovim/AstroNvim
- maxbrunet/dotfiles: astronvim with nix flakes.
- Misc