From 56cdd78d7fa605b67ed5c83b0c8f00b095157a36 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 23 Jul 2023 20:27:02 -0400 Subject: users/seth: add support for darwin --- users/seth/home.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'users/seth/home.nix') diff --git a/users/seth/home.nix b/users/seth/home.nix index e32f956..c24472b 100644 --- a/users/seth/home.nix +++ b/users/seth/home.nix @@ -1,12 +1,25 @@ -_: { +{ + lib, + pkgs, + ... +}: { imports = [ ./programs ./shell ]; - home = { + home = let username = "seth"; - homeDirectory = "/home/seth"; + inherit (pkgs.stdenv) isLinux isDarwin; + optionalLinuxDarwin = lib.optionalString (isLinux || isDarwin); + in { + inherit username; + homeDirectory = optionalLinuxDarwin ( + if isLinux + then "/home/${username}" + else "/Users/${username}" + ); + stateVersion = "23.11"; }; } -- cgit v1.2.3