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/default.nix | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'users/seth/default.nix') diff --git a/users/seth/default.nix b/users/seth/default.nix index 1eb5ac2..8a2cfa7 100644 --- a/users/seth/default.nix +++ b/users/seth/default.nix @@ -1,14 +1,24 @@ { config, + lib, pkgs, ... }: { - users.users.seth = { - extraGroups = ["wheel"]; - isNormalUser = true; - shell = pkgs.fish; - passwordFile = config.age.secrets.sethPassword.path; - }; + users.users.seth = let + inherit (pkgs.stdenv) isLinux isDarwin; + in + lib.recursiveUpdate { + shell = pkgs.fish; + home = lib.optionalString (isLinux || isDarwin) ( + if isLinux + then "/home/seth" + else "/Users/seth" + ); + } (lib.optionalAttrs pkgs.stdenv.isLinux { + extraGroups = lib.optional pkgs.stdenv.isLinux "wheel"; + isNormalUser = true; + passwordFile = config.age.secrets.sethPassword.path; + }); programs.fish.enable = true; -- cgit v1.2.3