summaryrefslogtreecommitdiff
path: root/users/seth/home.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-07-23 20:27:02 -0400
committerseth <[email protected]>2023-07-23 20:58:15 -0400
commit56cdd78d7fa605b67ed5c83b0c8f00b095157a36 (patch)
tree4baee00100877bdf88f430cdf0609ca9154e7d8d /users/seth/home.nix
parent787df3a240cf591cfe42b2db3036f903925d3d97 (diff)
users/seth: add support for darwin
Diffstat (limited to 'users/seth/home.nix')
-rw-r--r--users/seth/home.nix19
1 files changed, 16 insertions, 3 deletions
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";
};
}