···11+# \*arr Profile
22+33+Complete \*arr stack for automated media management and downloading.
44+55+## Usage
66+77+```nix
88+{
99+ myNixOS.profiles.arr = {
1010+ enable = true;
1111+ dataDir = "/var/lib"; # optional, default location
1212+ };
1313+}
1414+```
1515+1616+## What It Enables
1717+1818+- **Sonarr** (port 8989): TV show management and downloading.
1919+- **Radarr** (port 7878): Movie management and downloading.
2020+- **Lidarr** (port 8686): Music management and downloading.
2121+- **Prowlarr** (port 9696): Indexer management for all \*arr services.
2222+- **Bazarr** (port 6767): Subtitle management and downloading.
2323+2424+## Features
2525+2626+- **Unified data directory**: All services store data under configurable `dataDir`.
2727+- **Firewall integration**: Automatically opens required ports for web interfaces.
2828+- **Proper permissions**: Sets up correct directory ownership for each service.
2929+- **Directory management**: Automatically creates required data directories.
3030+3131+## Default Ports
3232+3333+All services have their standard ports opened in the firewall for web UI access.
+27
modules/nixos/profiles/autoUpgrade/README.md
···11+# Auto Upgrade Profile
22+33+Automatic system updates from the flake repository.
44+55+## Usage
66+77+```nix
88+{
99+ myNixOS.profiles.autoUpgrade = {
1010+ enable = true;
1111+ operation = "boot"; # or "switch" or "test"
1212+ };
1313+}
1414+```
1515+1616+## What It Does
1717+1818+- **Scheduled updates**: Daily updates at 2:00 AM with up to 120 minutes random delay.
1919+- **Flake integration**: Updates from `github:alyraffauf/nixcfg` (or configured `FLAKE` variable).
2020+- **Reboot window**: Automatic reboots only between 2:00-6:00 AM.
2121+- **Network check**: Tests connectivity before attempting updates.
2222+- **Retry logic**: Retries failed updates (useful for laptops that wake without network).
2323+- **Persistent timers**: Updates survive system reboots and sleep cycles and begin when possible.
2424+2525+## Important Notes
2626+2727+Enables automatic reboots by default during the 2:00-6:00 AM window.
+36
modules/nixos/profiles/backups/README.md
···11+# Backups Profile
22+33+Automatic backup configuration for enabled services using Restic and Backblaze B2.
44+55+## Usage
66+77+```nix
88+{
99+ myNixOS.profiles.backups.enable = true;
1010+}
1111+```
1212+1313+## What It Does
1414+1515+- **Automatic detection**: Only backs up services that are actually enabled on the system.
1616+- **Service management**: Stops services before backup, restarts them after completion.
1717+- **Backblaze B2 storage**: All backups stored in `aly-backups` bucket with hostname separation.
1818+- **Per-service repositories**: Each service gets its own restic repository for isolation.
1919+- **Smart exclusions**: Excludes problematic paths (e.g., Plex database locks).
2020+2121+## Supported Services
2222+2323+- **Media**: Plex, Jellyfin, Audiobookshelf, Immich
2424+- **\*arr stack**: Sonarr, Radarr, Lidarr, Prowlarr, Readarr, Bazarr
2525+- **Development**: Forgejo (when not using external storage), PostgreSQL
2626+- **Utilities**: qBittorrent, Uptime Kuma, Tautulli, Ombi
2727+- **Smart home**: Homebridge
2828+- **Security**: Vaultwarden
2929+- **Other**: CouchDB, PDS (Bluesky)
3030+3131+## How It Works
3232+3333+1. **Conditional activation**: Backups only created for services enabled in your configuration.
3434+2. **Safe stopping**: Services stopped gracefully before backup to ensure data consistency.
3535+3. **Repository structure**: `rclone:b2:aly-backups/{hostname}/{service}` per service.
3636+4. **Restic integration**: Uses `mySnippets.restic` configuration for default scheduling and retention settings.
+25
modules/nixos/profiles/base/README.md
···11+# Base Profile
22+33+Essential NixOS system configuration enabled on most of my systems, bot hdesktops and servers.
44+55+## Usage
66+77+```nix
88+{
99+ myNixOS.profiles.base.enable = true;
1010+}
1111+```
1212+1313+## What It Does
1414+1515+- **Essential packages**: git, helix editor, htop, wget, inxi system info, lm_sensors.
1616+- **Modern coreutils**: Uses uutils over GNU coreutils.
1717+- **Development environment**: direnv with nix-direnv for automatic shell environments.
1818+- **Flake configuration**: Sets `FLAKE` and `NH_FLAKE` to `github:alyraffauf/nixcfg` for system rebuilds.
1919+- **SSH security**: Disables password authentication, uses SSH keys only, includes known hosts.
2020+- **GnuPG integration**: GPG agent with SSH support for key management.
2121+- **Sudo configuration**: Uses sudo-rs (Rust sudo) with passwordless wheel group access.
2222+- **Network management**: NetworkManager for WiFi and network connectivity.
2323+- **Remote development**: VS Code server support for remote editing.
2424+- **File system caching**: CacheFS with 20% run, 10% cull, 5% stop thresholds.
2525+- **System integration**: Polkit for privilege escalation, rtkit for realtime scheduling.
+41
modules/nixos/profiles/btrfs/README.md
···11+# Btrfs Profile
22+33+Btrfs filesystem management with snapshots, scrubbing, and optional deduplication.
44+55+## Usage
66+77+```nix
88+{
99+ myNixOS.profiles.btrfs = {
1010+ enable = true;
1111+ deduplicate = false; # optional, enables beesd
1212+ };
1313+}
1414+```
1515+1616+## What It Does
1717+1818+- **Filesystem support**: Enables btrfs kernel support.
1919+- **Auto-scrubbing**: Periodic data integrity checks on all btrfs filesystems.
2020+- **Snapshots**: Automatic timeline snapshots of `/home` with snapper (if btrfs subvolume).
2121+- **Smart filtering**: Excludes cache, config, and temporary files from snapshots.
2222+- **Deduplication**: Optional beesd for block-level deduplication (when enabled).
2323+- **GUI tools**: Includes snapper-gui on desktop systems.
2424+2525+## Snapshot Configuration
2626+2727+- **Timeline snapshots**: Automatic creation and cleanup enabled.
2828+- **User access**: Users group can manage their own snapshots.
2929+- **Filtered paths**: Excludes `.cache`, `.config`, `.local`, browser profiles, etc.
3030+3131+## Deduplication (Optional)
3232+3333+When `deduplicate = true`:
3434+3535+- **beesd**: Runs with 2GB hash tables and conservative load targets.
3636+- **Performance tuning**: Limited to 50% thread factor and 1.0 load average.
3737+- **Auto-discovery**: Automatically configures all detected btrfs devices.
3838+3939+## Important Notes
4040+4141+Only activates features for detected btrfs filesystems. Snapper only configured if `/home` is a btrfs subvolume.
+25
modules/nixos/profiles/server/README.md
···11+# Server Profile
22+33+NixOS profile optimized for headless server environments.
44+55+## Usage
66+77+```nix
88+{
99+ myNixOS.profiles.server.enable = true;
1010+}
1111+```
1212+1313+## What It Does
1414+1515+- **Minimal footprint**: Disables documentation and reduces system overhead.
1616+- **Log management**: Volatile journald storage with 32MB limits to preserve disk space.
1717+- **File monitoring**: Optimized inotify limits for server workloads.
1818+- **Memory management**: ZRAM swap with zstd compression for efficiency.
1919+- **Security**: Automatic fail2ban protection against brute force attacks.
2020+- **Performance tuning**: BPF-based automatic kernel tuning.
2121+- **Reliability**: systemd-oomd for out-of-memory protection.
2222+2323+## Important Notes
2424+2525+Disables coredumps and emergency mode for unattended operation.
+27
modules/nixos/profiles/workstation/README.md
···11+# Workstation Profile
22+33+NixOS profile with performance optimizations for gaming, media, and desktop use.
44+55+## Usage
66+77+```nix
88+{
99+ myNixOS.profiles.workstation.enable = true;
1010+}
1111+```
1212+1313+## What It Does
1414+1515+- **Kernel optimizations**: Latest kernel with performance-focused scheduler settings.
1616+- **Network optimizations**: BBR congestion control, TCP fastopen, reduced latency.
1717+- **Memory management**: Optimized dirty page handling and swap behavior.
1818+- **Storage scheduling**: Automatic scheduler selection (kyber for SSDs, bfq for HDDs/SD cards).
1919+- **Process management**: Ananicy for automatic process prioritization.
2020+- **Low-latency audio**: Special rules for audio workloads.
2121+- **ZRAM swap**: Compressed swap in memory.
2222+2323+## Important Notes
2424+2525+⚠️ **Ananicy and GameMode are incompatible** - this profile enables Ananicy by default, so don't enable GameMode simultaneously.
2626+2727+Some optimizations trade system resiliency for performance (e.g., disabled watchdogs).