summaryrefslogtreecommitdiff
path: root/users/seth/home.nix
diff options
context:
space:
mode:
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";
};
}