Merge pull request #77294 from worldofpeace/systemd-packages-duplicates
nixos/systemd-lib: don't fail on systemd.packages duplicates
This commit is contained in:
commit
b3c8534911
1 changed files with 7 additions and 1 deletions
|
@ -147,7 +147,13 @@ in rec {
|
|||
done
|
||||
|
||||
# Symlink all units provided listed in systemd.packages.
|
||||
for i in ${toString cfg.packages}; do
|
||||
packages="${toString cfg.packages}"
|
||||
|
||||
# Filter duplicate directories
|
||||
declare -A unique_packages
|
||||
for k in $packages ; do unique_packages[$k]=1 ; done
|
||||
|
||||
for i in ''${!unique_packages[@]}; do
|
||||
for fn in $i/etc/systemd/${type}/* $i/lib/systemd/${type}/*; do
|
||||
if ! [[ "$fn" =~ .wants$ ]]; then
|
||||
if [[ -d "$fn" ]]; then
|
||||
|
|
Loading…
Reference in a new issue