From 2d92e8362f7f51d78dec8c32d0bd79527de465fd Mon Sep 17 00:00:00 2001 From: TrudeEH Date: Wed, 9 Oct 2024 19:19:49 +0100 Subject: [PATCH] Automate home path setting --- nix/home.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nix/home.nix b/nix/home.nix index 926c188f..15b6cf9e 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -4,14 +4,15 @@ let inherit (lib) mkIf optionals; inherit (pkgs.stdenv) isLinux isDarwin; #GNOME on Linux + userName = "trude"; in { # ======================================================================= # ----------------------- HOME & INSTALLED PACKAGES --------------------- # ======================================================================= - home.username = "trude"; - home.homeDirectory = "/home/trude"; + home.username = userName; + home.homeDirectory = if isLinux then "/home/${userName}" else "/Users/${userName}"; home.stateVersion = "24.05"; nixpkgs.config.allowUnfree = true;