From 9a76fb9a852fdf9edd3b0aabc119efa1d618f969 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Wed, 21 Jun 2023 00:46:30 +0200 Subject: [PATCH] home-environment: allow skipping sanity checks See https://github.com/nix-community/home-manager/issues/4019#issuecomment-1568659267 --- modules/home-environment.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 361db30e8..48d08580f 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -711,8 +711,10 @@ in ${builtins.readFile ./lib-bash/activation-init.sh} - checkUsername ${escapeShellArg config.home.username} - checkHomeDirectory ${escapeShellArg config.home.homeDirectory} + if [[ ! -v SKIP_SANITY_CHECKS ]]; then + checkUsername ${escapeShellArg config.home.username} + checkHomeDirectory ${escapeShellArg config.home.homeDirectory} + fi ${activationCmds} '';