Added link creation to activation script

This commit is contained in:
Jan-Bulthuis 2025-06-10 03:04:44 +02:00
parent db4bd8cfd9
commit 029ff0c9a3

View File

@ -138,7 +138,7 @@ in
inherit pkgs; inherit pkgs;
modules = [ modules = [
( (
{ ... }: { lib, ... }:
{ {
home.stateVersion = "24.11"; home.stateVersion = "24.11";
home.username = "$USER"; home.username = "$USER";
@ -146,16 +146,17 @@ in
modules.profiles.base.enable = true; modules.profiles.base.enable = true;
# Mount the directories from the network share # Mount the directories from the network share
home.persistence."/network/$USER" = { home.activation.dirMount = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
directories = [ if klist -s; then
"Music" echo "Kerberos ticket found, mounting home directory"
"Pictures" ln -s /network/$USER/Documents $HOME/Documents || true
"Documents" ln -s /network/$USER/Music $HOME/Music || true
"Videos" ln -s /network/$USER/Pictures $HOME/Pictures || true
]; ln -s /network/$USER/Video $HOME/Video || true
files = [ ]; else
allowOther = true; echo "No kerberos ticket found"
}; fi
'';
} }
) )
] ++ config.home-manager.sharedModules; ] ++ config.home-manager.sharedModules;