nix flake update
nixos-rebuild switch --flake .#server
TODO:
References to review:
- make shares: https://github.com/notthebee/nix-config/blob/3d3b66c63098afde4c7bca60054c1fe56da206be/machines/nixos/emily/shares/default.nix#L36
- make media dirs https://github.com/notthebee/nix-config/blob/3d3b66c63098afde4c7bca60054c1fe56da206be/services/arr/default.nix#L37
- HA config: https://github.com/notthebee/nix-config/blob/3d3b66c63098afde4c7bca60054c1fe56da206be/services/smarthome/homeassistant.nix#L8
- paperless: https://www.reddit.com/r/selfhosted/comments/10eiy4n/paperlessngx_for_ios/
- paperless: https://www.reddit.com/r/selfhosted/comments/171rd8n/a_deep_dive_into_paperlessngx/
- recipes: https://github.com/mealie-recipes/mealie
- restic review: https://github.com/NobbZ/nixos-config/blob/1868cda7a1a02d9772978663a0d7cb1fa5e5208f/home/modules/services/restic/default.nix#L79
- youtube dl https://github.com/jmbannon/ytdl-sub https://github.com/alexta69/metube https://github.com/meeb/tubesync
Ordered by Priority:
- Authelia
- SMART tools monitoring and notifications
- Prowlarr
- Transmission
- Sonarr
- Radarr
- Bazarr restore
- Jellyseerr
- Unpackerr
- Jellyfin
- Watchtower?
- Cloudflare-ddns
- Immich photo backup / test it is working
- Add media path configs and create the directories
- Change all the paths in all the services to new location
- Auth: Create more users
- Auth: can user change password?
- power: check usage and optimize
- Enable Auth on all endpoints
- Do we need to do basic-auth and forward anywhere?
- Move sftpjail out of security.nix
- PlexTraktSync https://github.com/Taxel/PlexTraktSync
- Test Jellyfin on Roku
- Make lldap available via local network and tailscale only
Transition
- Confirm USB backup is up-to-date
- server: remove both hard drives
- syno: remove one HD and install in server
- server: partition and add to nix as data drive in mergerfs
- server: rsync synology to data drive
- syno: insert enterprise drive and force rebuild
- syno: remove other HD and install in server
- server: partition and add to nix as snapraid
- server: trigger snapraid sync
- syno: insert enterprise drive and force rebuild
- server: rsync (again) synology to data drive
- change over port forwarding
- server: wait till server is running smoothly, then move external drive over
- server: add a daily rsync from server to synology
Low Priority
-
smart raid alt: https://github.com/AnalogJ/scrutiny
-
container updates
-
airprint
-
systemd notify on failure
-
auto container updates
-
systemd notify on failure, general handler. can use ntfy.sh
-
Look into OIDC w/ Jellyfin
-
Get apex domain working and loading homepage-dashboard
-
Speedtest
-
Enable fail2ban
-
auto camera copy: https://github.com/stonfute/BashUSBCopy
-
See if any app can provide terminal in event ssh goes down (or screw up config)
-
Setup backup on external disk
-
Rclone google drive backup
-
Disable login to FileBrowser
-
add a mkMediaUser fn in lib
-
add homepage-dashboard ref: https://github.com/LongerHV/nixos-configuration/blob/424d51e746951244369c21a45acf79d050244f8c/modules/nixos/homelab/homepage.nix#L3
-
MergerFS
-
Docker socket proxy
-
Jellyfin
-
Fix server power light
-
Uptime Kuma / statping
-
Homepage
-
Mailrise
--delete --delete-excluded
keychain ~/.ssh/id25519
sudo bash
RSYNC_ARGS="--rsync-path=/usr/bin/rsync -ahP --exclude @eaDir/"
rsync $RSYNC_ARGS [email protected]:/volume1/applications/ /mnt/pool/applications
rsync $RSYNC_ARGS [email protected]:/volume1/backup/ /mnt/pool/backup
rsync $RSYNC_ARGS \
-og --chown media:media \
[email protected]:/volume1/data/ /mnt/pool/media
rsync $RSYNC_ARGS \
--exclude 'home-gallery/' \
--exclude 'oveerseerr/cache/' \
--exclude 'plex/Library/Application Support/Plex Media Server/Cache/' \
[email protected]:/volume1/docker /mnt/pool/backup
rsync $RSYNC_ARGS [email protected]:/volume1/documents/ /mnt/pool/documents
rsync $RSYNC_ARGS [email protected]:/volume1/etc /mnt/pool/backup
rsync $RSYNC_ARGS \
-og --chown photos:photos \
[email protected]:/volume1/photo/ /mnt/pool/photos
rclone copy syno_sftp:/data /mnt/pool/media
--sftp-path-override /volume1/data
--multi-thread-streams=32 -v
rclone copy syno_sftp:/photo /mnt/pool/photos
--sftp-path-override /volume1/photo
--multi-thread-streams=32
If needed: find /mnt/user -name @eaDir -exec rm '{}' ;
sudo chown -R media:media /path/to/directory find /path/to/directory -type f -exec chmod 640 {} ; find /path/to/directory -type d -exec chmod 750 {} ;
- Open a terminal and run
lsblk
to list all disks and their device paths (e.g.,/dev/sda
). - Note the device path of the raw hard drive you want to add.
lsblk
Create a New GPT Partition Table with sgdisk
Note: all commands must be run with root privileges
- Run
sgdisk -v /dev/device
to verify the device is empty and has no existing partition table.
- Run
sgdisk --clear /dev/device
to create a new GPT partition table. The--clear
option will clear the existing partition table and create a new one.
- Run
sgdisk --new 1:0:0 --change-name 1:"Storage" /dev/device
to create a single partition spanning the entire device. The options used are:-n 1:0:0
to create a new partition with the following attributes:1
is the partition number0
is the starting sector (default is 2048)0
is the ending sector (default is the last sector on the device)
-c 1:"Storage"
to set the partition name to "Storage"
- Run
sgdisk -p /dev/device
to verify the partition table and ensure the new partition has been created correctly.
- Format each partition with ext4 and the largefile option by running:
sudo mkfs.ext4 -L <LABEL> -T largefile /dev/partition
To make the mount persistent across reboots, you need to add an entry to your NixOS configuration. Open /etc/nixos/configuration.nix in your preferred text editor and add the following under the fileSystems attribute:
{
fileSystems."/mnt/mynewdrive" = {
device = "/dev/sda1";
fsType = "ext4";
options = [ "defaults" "largefile" ];
};
}
/mnt/disks/ /mnt/parity/
/mnt/flash
/mnt/depot
/mnt/pool (combine of flash and depot)