summaryrefslogtreecommitdiff
path: root/home.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home.nix')
-rw-r--r--home.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/home.nix b/home.nix
index 48c9cb5..89ccc9d 100644
--- a/home.nix
+++ b/home.nix
@@ -1,10 +1,12 @@
{
lib,
+ osConfig ? null,
...
}:
let
- detectedHostname = builtins.getEnv "HOSTNAME";
+ detectedHostname =
+ if osConfig != null then osConfig.networking.hostName else builtins.getEnv "HOSTNAME";
detectedUsername = builtins.getEnv "USER";
detectedHome =
let