···2233Welcome to my **nixcfg**!
4455-This repository contains my NixOS and Home-Manager configurations, along with custom modules and packages. It is modular, declarative, and tailored for multi-device setups.
55+This repository contains my Darwin, NixOS and home-manager configurations, along with whatever custom modules and packages they require. It is modular, declarative, and tailored for multi-device setups. Hopefully, it's as useful to you as it is to me!
6677---
88···12121313## ✨ Features
14141515-- **Encryption:** Encrypted boot drives with Secure Boot, LUKS, and TPM decryption.
1616-- **Hardware Configuration**: Robust hardware support for all hosts.
1717-- **Home-Manager**: Unified management of user environments.
1818-- **Hyprland:** Dynamic tiling Wayland compositor and window manager.
1919-- **Modular Configuration**: Organized and reusable modules for simplicity.
2020-- **Multi-Device Support**: Written with multiple hosts in mind.
2121-- **Stylix:** Auto-generated base16 themes for the whole desktop.
1515+- **Declarative System & Dotfiles:** Fully declarative management of my macOS (Darwin) + Linux installations and user environments (dotfiles, packages) using Flakes, NixOS, nix-darwin, and home-manager.
1616+- **Multi-Host Configs:** Seamlessly configures my diverse hosts including bare-metal PCs, laptops (Framework, ThinkPad), mini-servers (Beelink), and virtual private servers (Hetzner, Netcup, AWS).
1717+- **Secure Boot & Encryption:** Encrypted boot drives with Secure Boot via `lanzaboote` and automatic LUKS decryption using TPM.
1818+- **Comprehensive Hardware Support:** Meticulously crafted configurations for my (sometimes unique) devices, including custom audio enhancements (Pipewire filter chains) and device-specific power optimizations.
1919+- **Hybrid Cloud Services:** Declarative setup for all the hosts and services that make up my overly complicated homelab, including the \*arr stack, Audiobookshelf, Caddy, Forgejo (my Git forge), Grafana + Loki + Prometheus, Immich, Karakeep, self-hosted AI inference with Ollama, Plex, qBittorrent, Vaultwarden, and more.
2020+- **Automatic Monitoring & Backups:** Easy Prometheus + Loki and Uptime-Kuma setups for system and service monitoring, plus automated Restic backups to Backblaze B2.
2121+- **Robust Networking:** Secure and flexible networking with Tailscale (it's WireGuard), declarative WiFi profiles, and NFS/Samba sharing.
2222+- **Productivity & Development:** Pre-configured tools for development (Git, Helix, VS Code, Zed), shell enhancements (fastfetch, oh-my-posh, zsh), etc.
2323+- **System-Wide Theming:** Consistent aesthetics across devices with stylix, which auto-generates application themes from base16 color schemes.
22242325---
2426···26282729```plaintext
2830.
3131+├── flake/ # Organized flake components
3232+│ ├── darwin.nix # macOS-specific configurations
3333+│ ├── home-manager.nix # Home-manager configurations
3434+│ ├── nixos.nix # NixOS-specific configurations
3535+│ └── ... # Other flake components
2936├── flake.nix # Main entry point
3037├── homes/ # home-manager configurations
3131-├── hosts/ # NixOS host configurations
3232-├── modules/ # Modules for NixOS and home-manager
3333-├── overlays/ # Custom Nixpkgs overlays
3434-├── pkgs/ # Custom packages
3535-└── README.md # This README
3838+├── hosts/ # NixOS and Darwin host configurations
3939+├── modules/ # Modular configurations
4040+│ ├── darwin/ # macOS-specific modules
4141+│ ├── home/ # home-manager modules
4242+│ ├── nixos/ # NixOS-specific modules
4343+│ └── snippets/ # Reusable configuration snippets
4444+└── overlays/ # Custom Nixpkgs overlays
3645```
3737-3838-### Key Files and Directories
3939-4040-- **`flake.nix`**: Central file linking all configurations using Nix Flakes.
4141-- **`homes/`**: User-specific home-manager configurations.
4242-- **`hosts/`**: Host configurations for NixOS.
4343-- **`modules/`**: Modules for NixOS and home-manager.
4444-- **`overlays/`**: Defines custom overlays to extend or override Nixpkgs.
4545-- **`pkgs/`**: Houses custom or patched package definitions.
4646-- **`secrets/`**: Securely stores encrypted credentials or sensitive data.
4747-4848----
4949-5050-## 🚀 Getting Started
5151-5252-### Prerequisites
5353-5454-- A working Nix installation with Flakes enabled.
5555-- Familiarity with NixOS, Home-Manager, and declarative configurations.
5656-5757-### Clone the Repository
5858-5959-```bash
6060-git clone https://github.com/alyraffauf/nixcfg.git
6161-cd nixcfg
6262-```
6363-6464-### Apply the Configuration
6565-6666-For **NixOS** systems:
6767-6868-```bash
6969-sudo nixos-rebuild switch --flake .#<hostname>
7070-```
7171-7272-For **Home-Manager** setups:
7373-7474-```bash
7575-home-manager switch --flake .
7676-```
7777-7878-> Replace `<hostname>` with the desired system configuration from your modules.
79468047---
8148