Resource bashrc

This commit is contained in:
Jan-Bulthuis 2025-06-09 13:24:58 +02:00
parent cdd94eefb3
commit d9dab5b9d3

View File

@ -127,7 +127,7 @@ in
# Set up home directory
security.pam.services.login.makeHomeDir = true;
security.pam.services.sshd.makeHomeDir = true;
environment.loginShellInit =
environment.etc.profile.text =
let
homeConfiguration = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
@ -144,11 +144,12 @@ in
] ++ config.home-manager.sharedModules;
};
in
''
mkAfter ''
# Activate Home Manager configuration for domain users
if id | egrep -o 'groups=.*' | sed 's/,/\n/g' | cut -d'(' -f2 | sed 's/)//' | egrep -o "^domain users$"; then
echo "Setting up environment for domain user"
SKIP_SANITY_CHECKS=1 ${homeConfiguration.activationPackage}/activate
. $HOME/.bashrc
fi
'';
};