From cdc8897467a1630259e49834f312c40fe9c0ec0d Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Tue, 30 May 2023 12:18:20 -0700 Subject: [PATCH] Fix an issue with darwin/home-manager expectatins for home directory --- nix/home/universal.nix | 2 +- nix/system/worktop/darwin-configuration.nix | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nix/home/universal.nix b/nix/home/universal.nix index 350601f..a1e82ec 100644 --- a/nix/home/universal.nix +++ b/nix/home/universal.nix @@ -29,7 +29,7 @@ with builtins; # Let Home Manager install and manage itself. programs.home-manager.enable = true; home.username = "haak"; - home.homeDirectory = "/home/haak"; + home.homeDirectory = if pkgs.stdenv.isDarwin then "/Users/haak/" else "/home/haak"; home.stateVersion = "22.05"; # no need for home-manager news, thanks diff --git a/nix/system/worktop/darwin-configuration.nix b/nix/system/worktop/darwin-configuration.nix index b996c3b..6a932b8 100644 --- a/nix/system/worktop/darwin-configuration.nix +++ b/nix/system/worktop/darwin-configuration.nix @@ -71,6 +71,10 @@ in # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix # environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; + # have to do this to play nicely with home-manager: + # https://github.com/nix-community/home-manager/issues/4026 + users.users.haak.home = "/Users/haak"; + # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; # nix.package = pkgs.nix;