Compare commits

...

2 Commits

4 changed files with 85 additions and 14 deletions

View File

@ -27,6 +27,7 @@
htop
pass
taskwarrior
tmux
gparted
@ -64,6 +65,7 @@
soundux
losslesscut-bin
yt-dlp
ffmpeg
calf
zynaddsubfx
@ -80,6 +82,7 @@
obs-studio-plugins.obs-pipewire-audio-capture
qbittorrent
transmission-qt
onlyoffice-bin

View File

@ -0,0 +1,31 @@
# catarina
## Partitions
```sh
mkfs.fat -F 32 /dev/sda1
fatlabel /dev/sda1 boot
mkfs.btrfs /dev/sda2
btrfs filesystem label /dev/sda2 nixos
mkdir -p /mnt
mount /dev/sda2 /mnt
btrfs subvolume create /mnt/root
btrfs subvolume create /mnt/nix
btrfs subvolume create /mnt/home
btrfs subvolume create /mnt/persist
btrfs subvolume create /mnt/swap
umount /mnt
mount -o compress=zstd,subvol=root /dev/sda2 /mnt
mkdir /mnt/{boot,nix,home,persist,swap}
mount /dev/sda1 /mnt/boot
mount -o compress=zstd,noatime,subvol=nix /dev/sda2 /mnt/nix
mount -o compress=zstd,subvol=home /dev/sda2 /mnt/home
mount -o compress=zstd,subvol=persist /dev/sda2 /mnt/persist
mount -o noatime,subvol=swap /dev/sda2 /mnt/swap
btrfs filesystem mkswapfile --size 16g --uuid clear /swap/swapfile
mkdir -p /media/{storage,btrbk-backups,btrbk-snapshots}
```

View File

@ -161,22 +161,46 @@ rec {
services.spoofdpi.enable = true;
services.qbittorrent-nox = {
enable = false;
webuiPort = 8085;
openFirewall = true;
services.btrfs.autoScrub = {
enable = true;
interval = "monthly";
fileSystems = [ "/" ];
};
#services.btrbk = {
# instances."catarina" = {
# onCalendar = "weekly";
# settings = {
# volume."/" = {
#
# };
# };
# };
#};
services.btrbk = {
instances."catarina" = {
onCalendar = "daily";
settings = {
snapshot_preserve_min = "2d";
snapshot_preserve = "14d";
snapshot_dir = "/media/btrbk-snapshots";
target_preserve_min = "no";
target_preserve = "14d 8w *m";
volume."/" = {
target = "/media/btrbk-backups";
subvolume = {
"var/lib/gitea" = {};
"var/lib/postgresql" = {};
"var/lib/postfix" = {};
"var/vmail" = {};
};
};
};
};
};
services.transmission = {
enable = true;
openRPCPort = true;
settings = {
rpc-bind-address = "0.0.0.0";
rpc-whitelist = "127.0.0.1,192.168.156.101";
download-dir = "/media/storage/downloads";
incomplete-dir = "/media/storage/downloads/incomplete";
};
};
# Packages
environment.systemPackages = with pkgs; [
@ -186,6 +210,7 @@ rec {
sshfs
exfat
btrfs-progs
btrbk
lm_sensors

View File

@ -93,6 +93,18 @@
fsType = "btrfs";
options = [ "subvol=swap" "noatime" ];
};
"/media/storage" = {
device = "/dev/disk/by-label/storage";
fsType = "btrfs";
options = [ "subvol=storage" "nofail" "compress=zstd" ];
};
"/media/btrbk-backups" = {
device = "/dev/disk/by-label/storage";
fsType = "btrfs";
options = [ "subvol=btrbk-backups" "nofail" "compress=zstd" ];
};
};
swapDevices = [