Automate home path setting

This commit is contained in:
2024-10-09 19:19:49 +01:00
parent d08e44566e
commit 2d92e8362f

View File

@@ -4,14 +4,15 @@
let let
inherit (lib) mkIf optionals; inherit (lib) mkIf optionals;
inherit (pkgs.stdenv) isLinux isDarwin; #GNOME on Linux inherit (pkgs.stdenv) isLinux isDarwin; #GNOME on Linux
userName = "trude";
in in
{ {
# ======================================================================= # =======================================================================
# ----------------------- HOME & INSTALLED PACKAGES --------------------- # ----------------------- HOME & INSTALLED PACKAGES ---------------------
# ======================================================================= # =======================================================================
home.username = "trude"; home.username = userName;
home.homeDirectory = "/home/trude"; home.homeDirectory = if isLinux then "/home/${userName}" else "/Users/${userName}";
home.stateVersion = "24.05"; home.stateVersion = "24.05";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;