all repos — nixfiles @ 85bc898e159693c5238a311efff3867aadb28841

System and user configuration, managed by nix and home-manager

darwin: force use of XDG-based user profile
Alan Pearce alan@alanpearce.eu
Sun, 12 May 2024 12:41:56 +0200
commit

85bc898e159693c5238a311efff3867aadb28841

parent

f433d8313946a1dcf7d8be09fe401344aed9de6f

1 files changed, 6 insertions(+), 0 deletions(-)

jump to
M system/settings/darwin.nixsystem/settings/darwin.nix
@@ -10,6 +10,12 @@ services.nix-daemon = {     enable = true;
     enableSocketListener = true;
   };
+
+  environment.profiles = with lib; mkMerge [
+    (mkOrder 800 [ "\${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile" ])
+    [ "/run/current-system/sw" "/nix/var/nix/profiles/default" ]
+  ];
+
   nix = {
     settings.cores = lib.mkDefault 0;
     daemonIOLowPriority = true;