From 65c2b9872b55918d057b5489de81ce2c59480054 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 8 Mar 2024 01:53:03 -0600 Subject: [PATCH] refactor(hosts/luna): improve disk layout --- flake.nix | 2 +- hosts/luna/os/fs.nix | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 623247e..e90092f 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ environment.persistence.ephemeral = { persistentStoragePath = "${persist-dir}/ephemeral"; hideMounts = true; - directories = [ "/var/lib" "/var/log" "/etc/nixos" ]; + directories = [ "/var/lib" "/etc/nixos" ]; }; }; }; diff --git a/hosts/luna/os/fs.nix b/hosts/luna/os/fs.nix index 5e3f457..8924e02 100644 --- a/hosts/luna/os/fs.nix +++ b/hosts/luna/os/fs.nix @@ -1,4 +1,4 @@ -{ modulesPath, config, lib, root-disk, persist-dir, ... }: +{ lib, root-disk, persist-dir, ... }: { services = { fstrim.enable = true; @@ -69,12 +69,20 @@ "/root" = { mountpoint = "/"; }; + "/var-log" = { + mountpoint = "/var/log"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; "/nix" = { mountpoint = "/nix"; mountOptions = [ "compress=zstd" "noatime" ]; }; - "/persist" = { - mountpoint = "/persist"; + "${persist-dir}" = { + mountpoint = "${persist-dir}"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "${persist-dir}/.snapshots" = { + mountpoint = "${persist-dir}/.snapshots"; mountOptions = [ "compress=zstd" "noatime" ]; }; };