steveej-laptop: improve and canonicalize activation scripts

This commit is contained in:
steveej 2018-09-04 12:48:24 +02:00
parent 8aa071d910
commit 08d0f5453a

View file

@ -294,19 +294,19 @@ rec {
# Activation scripts for impure set up of paths in / # Activation scripts for impure set up of paths in /
system.activationScripts.bin = '' system.activationScripts.bin = ''
echo "setting up /bin..." echo "setting up /bin..."
ln -sfn ${pkgs.bash}/bin/bash /tmp/.binbash ln -sfT ${pkgs.bash}/bin/bash /bin/.bash
mv /tmp/.binbash /bin/bash mv -Tf /bin/.bash /bin/bash
''; '';
system.activationScripts.etcX11sessinos = '' system.activationScripts.etcX11sessinos = ''
echo "setting up /etc/X11/sessions..." echo "setting up /etc/X11/sessions..."
mkdir -p /etc/X11 mkdir -p /etc/X11
[[ ! -L /etc/X11/sessions ]] || rm /etc/X11/sessions ln -sfT ${config.services.xserver.displayManager.session.desktops} /etc/X11/.sessions
ln -sf ${config.services.xserver.displayManager.session.desktops} /etc/X11/sessions mv -Tf /etc/X11/.sessions /etc/X11/sessions
''; '';
system.activationScripts.lib64 = '' system.activationScripts.lib64 = ''
echo "setting up /lib64..." echo "setting up /lib64..."
mkdir -p /lib64 mkdir -p /lib64
ln -sf ${pkgs.stdenv.glibc}/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 ln -sfT ${pkgs.stdenv.glibc}/lib/ld-linux-x86-64.so.2 /lib64/.ld-linux-x86-64.so.2
mv -Tf /lib64/.ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
''; '';
} }