Skip to content

rhoriguchi/nixos-setup

Repository files navigation

nix-setup

Switch to unstable package channel

sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos

Manual setup

Laptop

  • SSH Keys
  • Discord
  • Gitkraken
  • JetBrains
    • DataGrip
    • IntelliJ IDEA Ultimate
    • PyCharm Professional
    • WebStorm
  • Firefox
    • BitWarden
    • Grammarly
    • MetaMask
    • Tab Session Manager
  • NixOps
  • ProtonVPN Gui
  • qBittorrent
  • Resilio Sync
  • GPG Key
  • Signal
  • Spotify
  • Steam
  • TeamViewer

Add KeePass password to keyring

nix-shell -p libsecret --run 'secret-tool store --label=KeePass KeePass 2FA'

Server

Setup Plex over http://IP:32400/web

Setup Tautulli http://IP:8181

Set any username and password. Will be removed after restart of service.

Google Photos Sync

Run the command the service gphotos-sync.service calls and authenticate the application with Google.

Setup ZFS

zpool create -f \
  -o ashift=12 \
  -o autotrim=on \
  -O compression=off \
  -O mountpoint=legacy \
  data \
  raidz \
    ata-Samsung_SSD_870_EVO_2TB_S6PPNM0TB02114B \
    ata-Samsung_SSD_870_EVO_2TB_S6PPNM0TB02182K \
    ata-Samsung_SSD_870_EVO_2TB_S6PPNM0TB06008F \
    ata-Samsung_SSD_870_EVO_2TB_S6PPNM0TB06013H

zfs create \
  -o compression=zstd \
  data/backup

zfs create \
  data/deluge

zfs create \
  data/loki

zfs create \
  data/series

zfs create \
  -o quota=512G \
  data/sync

Update flake

nix flake update

Setup direnv

Navigate to directory and run command

direnv allow .

deploy-rs

Deploy all

deploy --keep-result . |& nom

Deploy single

deploy --keep-result '.#Laptop' |& nom

Encrypt backup drive

cryptsetup luksFormat --type luks2 /dev/sdX

dd if=/dev/random bs=256 count=1 of=/PATH_TO_KEY_FILE
cryptsetup luksAddKey /dev/sdX /PATH_TO_KEY_FILE

cryptsetup luksOpen --key-file /PATH_TO_KEY_FILE /dev/disk/by-uuid/792d67dc-3de4-4790-9e51-ec281e28b0d1 backup

mkfs.ext4 -L backup /dev/mapper/backup

Upgrade firmware

Hardware

List hardware

fwupdmgr get-devices

Upgrade hardware

fwupdmgr refresh
fwupdmgr get-updates
fwupdmgr update

Raspberry Pi

mkdir -p /mnt/FIRMWARE && mount /dev/disk/by-label/FIRMWARE /mnt/FIRMWARE
BOOTFS=/mnt/FIRMWARE FIRMWARE_RELEASE_STATUS=stable rpi-eeprom-update -d -a
umount /mnt/FIRMWARE && rm -rf /mnt/FIRMWARE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published