Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
26 lines
735 B
Bash
Executable File
26 lines
735 B
Bash
Executable File
# shellcheck shell=bash
|
|
|
|
# This setup hook, for each output, moves everything in
|
|
# $output/lib/systemd/user to $output/share/systemd/user, and replaces
|
|
# $output/lib/systemd/user with a symlink to
|
|
# $output/share/systemd/user.
|
|
|
|
fixupOutputHooks+=(_moveSystemdUserUnits)
|
|
|
|
_moveSystemdUserUnits() {
|
|
if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then return; fi
|
|
if [ ! -e "${prefix:?}/lib/systemd/user" ]; then return; fi
|
|
local source="$prefix/lib/systemd/user"
|
|
local target="$prefix/share/systemd/user"
|
|
echo "moving $source/* to $target"
|
|
mkdir -p "$target"
|
|
(
|
|
shopt -s dotglob
|
|
for i in "$source"/*; do
|
|
mv "$i" "$target"
|
|
done
|
|
)
|
|
rmdir "$source"
|
|
ln -s "$target" "$source"
|
|
}
|