Skip to content
/ nixos Public

❄️ This is setup for my NixOS devices. ❄️

Notifications You must be signed in to change notification settings

shuritch/nixos

Repository files navigation

Atlas

Deep dive into declarative configuration


 Installation 


 Structure 


 Flake 


 Assets and Preview 


 Cluster 


 Modules 


 Workflows 

📦 Userland Isolation 🍙 Declarative 🌱 Reproducible 👁️‍🗨️ Private 🛡️ Secure 🏗️ Custom Installer 🧪 CI 🎨 Colorscheme based on wallpaper 🔧 Extensively configured 🐧 Minimal when needed 🧳 Role based configuration 🚀 Class based configuration ⚡ Easy to manage 🖇️ Dualboot support 🔃 State synchronization 🗿 User specific configuration

Installation

Caution

Applying custom configurations, especially those related to your operating system, can have unexpected consequences and may interfere with your system's normal behavior. While I have tested these configurations on my own setup, there is no guarantee that they will work flawlessly for you. I am not responsible for any issues that may arise from using this configuration.

# Automatic installation (Live CD)
nix-shell -p curl git
./install.sh
# Manual installation (Live CD)
nix-shell -p curl git
curl https://raw.githubusercontent.com/shuritch/nixos/main/core/cluster/<hostname>/disko.nix > /mnt/config/disko.nix
# Edit disko.nix (Replace device with name from lsblk result at least)
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /mnt/config/disko.nix
git clone https://github.com/shuritch/nixos /mnt/etc/nixos/flake
sudo nixos-generate-config --dir /mnt/etc/nixos
mv -f /mnt/etc/nixos/hardware-configuration.nix /mnt/etx/nixos/flake/cluster/<hostname>
sudo nixos-install --flake /mnt/etc/nixos/flake#<hostname>
# reboot 🚀

Updates

nix flake update
sudo nixos-rebuild --upgrade switch --flake .#<hostname>

Rebuilding

git add . # Important if new files were created
sudo nixos-rebuild switch --flake .#<hostname> # If Hosts updated

Structure

.
│  # 👇 Cluster
│ ╭> atlas                          # Desktop │ 32GB RAM, i9-9900k , RTX 2080S & UHD630 │ Hyprland
│ ├> hermes                         # Laptop  │ 16GB RAM, i7-1165G7, Iris XE G7         │ Hyprland
│ ├> pandora                        # ISO     │ Bootable USB                            │ TTY
├─┤
│ │  # 👇 Host configuration (example)
│ │ ╭> config                       # Separated configuration
│ │ ├> hardware-configuration.nix   # Generated hardware configuration.
│ └─┼> default.nix                  # Configuration entry point.
│   ╰> host_ed25519.pub             # Ssh ed25519 public key.
│
│   ╭> home                         # Modules written to isolate Home-manager configuration.
│ ┌─┼> core                         # Modules written to isolate Nixos configuration.
│ │ ├> class                        # Presets based on device class (server, desktop, etc).
│ │ ╰> roles                        # Presets based on chosen roles (headless, dev-kit, etc).
│ │  # 👆 Modules
│ │
│ ├> overlays                       # Patches and custom overrides for some packages.
│ ├> templates                      # Language based templates.
├─┼> library                        # Utilities for Nix language.
│ ├> packages                       # Self hosted packages.
│ ╰> disko                          # Disko presets.  # 👆 SRC
│
├> .github                          # Docs, assets, workflows
├> .vscode                          # Makes vscode more performant in this directory.
├> install.sh                       # Shell script for automatic installation.
├> shell.nix                        # Exposes a dev shell for bootstrapping.
╰> flake.nix                        # Entrypoint

Copyright © 2022-2024 Alexander Ivanov.
This package is MIT licensed.