From 6df237880920a812a174f6e5a8c8e88b40a01156 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Tue, 18 Jul 2023 17:49:13 +0300 Subject: [PATCH] Lapetus filesystems --- hosts/nixos/lapetus/default.nix | 1 + hosts/nixos/lapetus/filesystems.nix | 16 +++++----------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index 66d4c53..ad7739d 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -6,6 +6,7 @@ ./services/syncthing.nix ./hardware-configuration.nix + ./filesystems.nix ./zfs.nix (import ./partitions.nix { diff --git a/hosts/nixos/lapetus/filesystems.nix b/hosts/nixos/lapetus/filesystems.nix index 69f2097..1bece46 100644 --- a/hosts/nixos/lapetus/filesystems.nix +++ b/hosts/nixos/lapetus/filesystems.nix @@ -1,13 +1,7 @@ +# Mark a bunch of paths as needed for boot +{ lib, ... }: { - fileSystems = - let zfs = { neededForBoot = true; options = [ "zfsutil" ]; }; - in - { - "/" = zfs; - "/nix" = zfs; - "/persist/data" = zfs; - "/persist/state" = zfs; - "/persist/local/cache" = zfs; - "/boot".neededForBoot = true; - }; + fileSystems = lib.attrsets.genAttrs + [ "/" "/nix" "/persist/data" "/persist/state" "/persist/local/cache" "/boot" ] + (_: { neededForBoot = true; }); }