From 61f3db56410f41d5249c88e44db60d9713dae26d Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Tue, 3 Dec 2024 21:19:39 -0600 Subject: home: big refactor --- home/isolation/default.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 home/isolation/default.nix (limited to 'home/isolation/default.nix') diff --git a/home/isolation/default.nix b/home/isolation/default.nix new file mode 100644 index 0000000..d5d2979 --- /dev/null +++ b/home/isolation/default.nix @@ -0,0 +1,34 @@ +{ config, lib, ... }: +with lib; let + cfg = config.local.shenvs; +in +{ + options.local.shenvs = { + enable = mkEnableOption "hm-isolation shenvs"; + }; + + config = mkIf cfg.enable { + home.isolation = { + enable = true; + btrfsSupport = true; + + defaults = { + static = false; + bindHome = "home"; + + persist = { + base = "shenvs"; + btrfs = true; + }; + }; + + modulesUnder = ../shenvs; + }; + + local = mkIf config.home.isolation.active { + desktop.enable = mkForce false; + environ.enable = mkForce false; + mail.enable = mkForce false; + }; + }; +} -- cgit v1.2.3