Compare commits
3 commits
88e0a1eb09
...
a95ae5f568
Author | SHA1 | Date | |
---|---|---|---|
Geoffrey Frogeye | a95ae5f568 | ||
Geoffrey Frogeye | de187c6044 | ||
Geoffrey Frogeye | 2804086233 |
|
@ -5,12 +5,12 @@
|
|||
razmo = {
|
||||
spec = "/mnt/razmo";
|
||||
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 = {
|
||||
spec = "/mnt/rapido";
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
networking.hostName = "curacao";
|
||||
};
|
||||
imports = [
|
||||
# ./backup
|
||||
./backup
|
||||
./co2meter
|
||||
# ./dedup
|
||||
./dedup
|
||||
./disko.nix
|
||||
./features.nix
|
||||
./hardware.nix
|
||||
|
|
|
@ -3,29 +3,39 @@
|
|||
# TODO Not relatime everywhere, thank you
|
||||
# TODO Default options
|
||||
let
|
||||
btrfs_args_hdd = [
|
||||
btrfs_args_ssd = [
|
||||
"rw"
|
||||
"relatime"
|
||||
"compress=zstd:3"
|
||||
"space_cache"
|
||||
"ssd"
|
||||
];
|
||||
btrfs_args_ssd = btrfs_args_hdd ++ [ "ssd" ];
|
||||
passwordFile = "/tmp/dotfiles_${config.networking.hostName}_password";
|
||||
in
|
||||
{
|
||||
boot.loader.efi.efiSysMountPoint = config.disko.devices.disk.razmo.content.partitions.esp.content.mountpoint;
|
||||
disko.devices = {
|
||||
disk = {
|
||||
razmo = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/ata-ST1000LM048-2E7172_WKP8925H";
|
||||
device = "/dev/disk/by-id/ata-SDLF1DAR-960G-1HA1_A027C1A3";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
# Needs enough to store multiple kernel generations
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
priority = 10;
|
||||
start = "2048";
|
||||
size = "6G";
|
||||
size = "8G";
|
||||
content = {
|
||||
type = "swap";
|
||||
randomEncryption = true;
|
||||
|
@ -36,78 +46,27 @@ in
|
|||
# Untranslated options from /etc/crypttab: swap,cipher=aes-xts-plain64,size=256
|
||||
};
|
||||
};
|
||||
nixosboot = {
|
||||
priority = 15;
|
||||
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;
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "razmo";
|
||||
passwordFile = passwordFile;
|
||||
settings = {
|
||||
# keyFile = "/etc/keys/razmo";
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
# extraArgs = [ "-f" ];
|
||||
extraArgs = [ "-f" ];
|
||||
mountpoint = "/mnt/razmo";
|
||||
mountOptions = btrfs_args_hdd;
|
||||
subvolumes = {
|
||||
"home.razmo" = {
|
||||
mountpoint = "/home.heavy";
|
||||
mountOptions = btrfs_args_hdd;
|
||||
mountOptions = [ "compress=zstd" "relatime" ];
|
||||
};
|
||||
"steam" = {
|
||||
mountpoint = "/opt/steam.razmo";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue