From e653366153b12be4b1ce4a4ad2d992cd46f2c763 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 21 Mar 2021 02:36:56 +0200 Subject: 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 --- users/tazjin/nixos/tverskoy/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'users/tazjin/nixos') diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix index 74c676f4e3..3c4b9dae11 100644 --- a/users/tazjin/nixos/tverskoy/default.nix +++ b/users/tazjin/nixos/tverskoy/default.nix @@ -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 = { -- cgit 1.4.1