···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.
···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.
···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.