feat(tazjin/tverskoy): Configure impermanence module

This module is responsible for mounting persistent storage into the
ephemeral root disk of this machine.

Currently only very basic configuration and data are retained, and
hopefully that won't change.

Change-Id: If800cbee60b7b3c5b8c457b9b332a0c05c33f20e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2621
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
Vincent Ambo 2021-03-21 02:36:56 +02:00 committed by tazjin
parent 6e94b3ca2f
commit e653366153

View file

@ -17,6 +17,10 @@ config: let
monolithic = false;
};
in lib.fix(self: {
imports = [
"${depot.third_party.impermanence}/nixos.nix"
];
boot = {
initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
initrd.kernelModules = [ ];
@ -52,6 +56,7 @@ in lib.fix(self: {
"/persist" = {
device = "zpool/safe/persist";
fsType = "zfs";
neededForBoot = true;
};
"/boot" = {
@ -98,6 +103,18 @@ in lib.fix(self: {
};
};
environment.persistence."/persist" = {
directories = [
"/var/log"
"/var/lib/bluetooth"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
];
files = [
"/etc/machine-id"
];
};
security.rtkit.enable = true;
services = {
pipewire = {