Compare commits

..

3 commits

Author SHA1 Message Date
Geoffrey Frogeye a95ae5f568
curacao: Reduce beesd load targets 2024-05-13 09:19:55 +02:00
Geoffrey Frogeye de187c6044 Revert "curacao: Relieve razmo of stress"
This reverts commit 2a3624af09.

With new razmo this should be fine.
2024-05-13 09:16:02 +02:00
Geoffrey Frogeye 2804086233
curacao: New razmo! 2024-05-12 20:34:22 +02:00
3 changed files with 30 additions and 71 deletions

View file

@ -5,12 +5,12 @@
razmo = { razmo = {
spec = "/mnt/razmo"; spec = "/mnt/razmo";
hashTableSizeMB = 512; # Recommended for 1 TiB, ×2 for compression, x2 for time hashTableSizeMB = 512; # Recommended for 1 TiB, ×2 for compression, x2 for time
extraOptions = [ "--loadavg-target" "10" ]; # This one is tame extraOptions = [ "--loadavg-target" "7.5" ];
}; };
rapido = { rapido = {
spec = "/mnt/rapido"; spec = "/mnt/rapido";
hashTableSizeMB = 128; # 4 times smaller disk, 4 times smaller hashtable? hashTableSizeMB = 128; # 4 times smaller disk, 4 times smaller hashtable?
extraOptions = [ "--loadavg-target" "7.5" ]; # This one can slow things down extraOptions = [ "--loadavg-target" "5" ];
}; };
}; };
}; };

View file

@ -4,9 +4,9 @@
networking.hostName = "curacao"; networking.hostName = "curacao";
}; };
imports = [ imports = [
# ./backup ./backup
./co2meter ./co2meter
# ./dedup ./dedup
./disko.nix ./disko.nix
./features.nix ./features.nix
./hardware.nix ./hardware.nix

View file

@ -3,29 +3,39 @@
# TODO Not relatime everywhere, thank you # TODO Not relatime everywhere, thank you
# TODO Default options # TODO Default options
let let
btrfs_args_hdd = [ btrfs_args_ssd = [
"rw" "rw"
"relatime" "relatime"
"compress=zstd:3" "compress=zstd:3"
"space_cache" "space_cache"
"ssd"
]; ];
btrfs_args_ssd = btrfs_args_hdd ++ [ "ssd" ];
passwordFile = "/tmp/dotfiles_${config.networking.hostName}_password"; passwordFile = "/tmp/dotfiles_${config.networking.hostName}_password";
in in
{ {
boot.loader.efi.efiSysMountPoint = config.disko.devices.disk.razmo.content.partitions.esp.content.mountpoint;
disko.devices = { disko.devices = {
disk = { disk = {
razmo = { razmo = {
type = "disk"; type = "disk";
device = "/dev/disk/by-id/ata-ST1000LM048-2E7172_WKP8925H"; device = "/dev/disk/by-id/ata-SDLF1DAR-960G-1HA1_A027C1A3";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
ESP = {
# Needs enough to store multiple kernel generations
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
swap = { swap = {
priority = 10; size = "8G";
start = "2048";
size = "6G";
content = { content = {
type = "swap"; type = "swap";
randomEncryption = true; randomEncryption = true;
@ -36,78 +46,27 @@ in
# Untranslated options from /etc/crypttab: swap,cipher=aes-xts-plain64,size=256 # Untranslated options from /etc/crypttab: swap,cipher=aes-xts-plain64,size=256
}; };
}; };
nixosboot = { luks = {
priority = 15; size = "100%";
size = "2G";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
esp = {
priority = 20;
size = "128M";
type = "EF00"; # EFI system partition
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/efi";
mountOptions = [
"rw"
"relatime"
"fmask=0022"
"dmask=0022"
"codepage=437"
"iocharset=iso8859-1"
"shortname=mixed"
"utf8"
"errors=remount-ro"
"noauto"
];
};
};
boot = {
priority = 30;
size = "128M";
content = {
type = "luks";
name = "boot";
extraFormatArgs = [ "--type luks1" ];
passwordFile = passwordFile;
settings = {
# keyFile = "/etc/keys/boot";
};
content = {
type = "filesystem";
format = "ext2";
mountpoint = "/mnt/old/boot";
mountOptions = [
"rw"
"relatime"
# "stripe=4" # For some reason doesn't work on NixOS
];
};
};
};
main = {
priority = 40;
content = { content = {
type = "luks"; type = "luks";
name = "razmo"; name = "razmo";
passwordFile = passwordFile; passwordFile = passwordFile;
settings = { settings = {
# keyFile = "/etc/keys/razmo"; allowDiscards = true;
}; };
content = { content = {
type = "btrfs"; type = "btrfs";
# extraArgs = [ "-f" ]; extraArgs = [ "-f" ];
mountpoint = "/mnt/razmo"; mountpoint = "/mnt/razmo";
mountOptions = btrfs_args_hdd;
subvolumes = { subvolumes = {
"home.razmo" = { "home.razmo" = {
mountpoint = "/home.heavy"; mountpoint = "/home.heavy";
mountOptions = btrfs_args_hdd; mountOptions = [ "compress=zstd" "relatime" ];
};
"steam" = {
mountpoint = "/opt/steam.razmo";
mountOptions = [ "compress=zstd" "noatime" ];
}; };
}; };
}; };