mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +08:00
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.
14 lines
421 B
Bash
Executable File
14 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
|