This is where unit files are expected to be, making GPU setup compatible with things like selinux. Fixes #8438. The `resources/` directory was kept because it is expected to be used in the future.
13 lines
421 B
Bash
Executable file
13 lines
421 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Install the systemd service file and ensure that the store path won't be
|
|
# garbage-collected as long as it's installed.
|
|
unit_path=/etc/systemd/system/non-nixos-gpu.service
|
|
ln -sf @@systemddir@@/non-nixos-gpu.service "$unit_path"
|
|
ln -sf "$unit_path" "@@statedir@@"/gcroots/non-nixos-gpu.service
|
|
|
|
systemctl daemon-reload
|
|
systemctl enable non-nixos-gpu.service
|
|
systemctl restart non-nixos-gpu.service
|