diff --git a/flake.nix b/flake.nix index ca7ba14..9c1f553 100644 --- a/flake.nix +++ b/flake.nix @@ -97,7 +97,7 @@ hostname = "${username}-mac"; isLaptop = true; system = arm; - useImpermanence = false; + useImpermanence = true; }; inherit username; inherit first-nixos-install; @@ -117,6 +117,7 @@ modules = [ ./nixos/configuration.nix inputs.apple-silicon-support.nixosModules.default + inputs.impermanence.nixosModules.impermanence ./nixos/mac-hardware-conf.nix ./nixos/macos/configuration.nix ] ++ general-modules; diff --git a/nixos/mac-hardware-conf.nix b/nixos/mac-hardware-conf.nix index be279be..7d5d9ef 100644 --- a/nixos/mac-hardware-conf.nix +++ b/nixos/mac-hardware-conf.nix @@ -13,15 +13,27 @@ boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = + fileSystems."/" = { + device = "none"; + fsType = "tmpfs"; + options = [ "size = 3G" "mode = 755" ]; + }; + fileSystems."/persist" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; + neededForBoot = true; }; - + fileSystems."/nix" = { + device = "/persist/nix"; + options = [ "bind" ]; + depends = [ "/persist" ] + neededForBoot = true; + }; fileSystems."/boot" = { device = "/dev/disk/by-label/EFI\\x20-\\x20NIXOS"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; + neededForBoot = true; }; swapDevices = [ ];