vno3-rp3b: moving to btrfs

This commit is contained in:
Motiejus Jakštys 2024-12-01 16:45:06 +02:00
parent f29aac43de
commit ab7dc58882

View File

@ -14,8 +14,6 @@
motiejus-passwd-hash.file = ../../secrets/motiejus_passwd_hash.age; motiejus-passwd-hash.file = ../../secrets/motiejus_passwd_hash.age;
root-passwd-hash.file = ../../secrets/root_passwd_hash.age; root-passwd-hash.file = ../../secrets/root_passwd_hash.age;
sasl-passwd.file = ../../secrets/postfix_sasl_passwd.age; sasl-passwd.file = ../../secrets/postfix_sasl_passwd.age;
datapool-passphrase.file = ../../secrets/vno3-rp3b/datapool-passphrase.age;
}; };
boot = { boot = {
@ -25,6 +23,16 @@
"vc4" "vc4"
"bcm2835_dma" "bcm2835_dma"
]; ];
luks.devices = {
luksdata = {
device = "/dev/disk/by-uuid/efa9b396-9ec0-40f7-a0d0-75edc0f6d5ad";
allowDiscards = true;
keyFileOffset = 9728;
keyFileSize = 512;
keyFile = "/dev/mmcblk1";
};
};
}; };
loader = { loader = {
grub.enable = false; grub.enable = false;
@ -33,8 +41,6 @@
kernelModules = [ ]; kernelModules = [ ];
extraModulePackages = [ ]; extraModulePackages = [ ];
supportedFilesystems = [ "zfs" ];
zfs.forceImportRoot = false;
}; };
powerManagement.cpuFreqGovernor = "ondemand"; powerManagement.cpuFreqGovernor = "ondemand";
@ -45,16 +51,9 @@
fsType = "ext4"; fsType = "ext4";
}; };
"/data" = { "/data" = {
device = "datapool/root"; device = "/dev/mapper/luksdata";
fsType = "zfs"; fsType = "btrfs";
}; options = [ "compress=zstd" ];
"/data/borg" = {
device = "datapool/root/borg";
fsType = "zfs";
};
"/data/shared" = {
device = "datapool/root/shared";
fsType = "zfs";
}; };
}; };
@ -77,10 +76,10 @@
email = "motiejus+alerts@jakstys.lt"; email = "motiejus+alerts@jakstys.lt";
}; };
snapshot = { #snapshot = {
enable = true; # enable = true;
mountpoints = [ "/data/shared" ]; # mountpoints = [ "/data/shared" ];
}; #};
}; };
services = { services = {
@ -89,14 +88,14 @@
node_exporter.enable = true; node_exporter.enable = true;
ping_exporter.enable = true; ping_exporter.enable = true;
borgstor = { #borgstor = {
enable = true; # enable = true;
dataDir = "/data/borg"; # dataDir = "/data/borg";
sshKeys = with myData; [ # sshKeys = with myData; [
hosts."fwminex.servers.jakst".publicKey # hosts."fwminex.servers.jakst".publicKey
people_pubkeys.motiejus # people_pubkeys.motiejus
]; # ];
}; #};
postfix = { postfix = {
enable = true; enable = true;
@ -113,13 +112,13 @@
}; };
}; };
jakstpub = { #jakstpub = {
enable = true; # enable = true;
dataDir = "/data/shared"; # dataDir = "/data/shared";
requires = [ "data-shared.mount" ]; # requires = [ "data-shared.mount" ];
uidgid = myData.uidgid.jakstpub; # uidgid = myData.uidgid.jakstpub;
hostname = "hdd.jakstys.lt"; # hostname = "hdd.jakstys.lt";
}; #};
}; };
}; };
@ -147,10 +146,6 @@
}; };
}; };
environment.etc = {
"datapool-passphrase.txt".source = config.age.secrets.datapool-passphrase.path;
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
raspberrypi-eeprom raspberrypi-eeprom
libraspberrypi libraspberrypi