From f20612525eb408c5190ed5365eeced1ea4fc1efb Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Sun, 13 Nov 2022 15:46:24 +0100 Subject: [PATCH] shared virtio fs --- capibara.nix | 8 ++++++++ home/nixos-common.nix | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/capibara.nix b/capibara.nix index d86884f..0c5decd 100644 --- a/capibara.nix +++ b/capibara.nix @@ -61,6 +61,14 @@ in { fsType = "btrfs"; options = [ "subvol=swap" ]; }; + + "/mnt/vfs_share" = { + device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=vfs_share" "compress=zstd" ]; + neededForBoot = true; + }; + }; environment.variables = { diff --git a/home/nixos-common.nix b/home/nixos-common.nix index 1d8afdf..1bf8aeb 100644 --- a/home/nixos-common.nix +++ b/home/nixos-common.nix @@ -61,6 +61,11 @@ allowOther = true; }; + "/mnt/vfs_share/${config.home.homeDirectory}" = { + directories = [ "vfs_share" ]; + allowOther = true; + }; + "/persist/${config.home.homeDirectory}" = { directories = [ ".Slic3r" @@ -131,6 +136,7 @@ home.packages = with pkgs; [ # calibre R + virtiofsd acpi android-tools ansible