Allow overriding username
More specifically, this assists with the Steam Deck.
This commit is contained in:
parent
252fcc6f6f
commit
a2c941ea44
3 changed files with 26 additions and 12 deletions
|
@ -8,22 +8,26 @@ let
|
|||
|
||||
# Whether to configure various programs to leverage GPG.
|
||||
gpg = specialArgs.gpg or false;
|
||||
in
|
||||
{
|
||||
|
||||
# It's standard convention that Darwin has the username
|
||||
# "spot" - "spotlight" was reserved by the system at some point.
|
||||
# "spot" - regretfully, "spotlight" is reserved by the system.
|
||||
# (Sigh... the downsides of sharing a namesake.)
|
||||
home.username =
|
||||
nativeUsername =
|
||||
if pkgs.stdenv.isDarwin then
|
||||
"spot"
|
||||
else
|
||||
"spotlight";
|
||||
|
||||
username = specialArgs.username or nativeUsername;
|
||||
in
|
||||
{
|
||||
home.username = username;
|
||||
|
||||
home.homeDirectory =
|
||||
if pkgs.stdenv.isDarwin then
|
||||
"/Users/spot"
|
||||
"/Users/" + username
|
||||
else
|
||||
"/home/spotlight";
|
||||
"/home/" + username;
|
||||
|
||||
# Git
|
||||
programs.git = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue