[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [question] How to start systemd services installed by packages in Ub
From: |
Nils Landt |
Subject: |
Re: [question] How to start systemd services installed by packages in Ubuntu? |
Date: |
Thu, 22 Feb 2024 11:54:29 +0100 (CET) |
> Rodrigo Morales <me@rodrigomorales.site> hat am 22.02.2024 03:17 CET
> geschrieben:
>
> 1. Is using systemd user services for packages, that are installed
> through =guix package -i=, the way how daemons are intended to be
> started in Ubuntu?
I'm guessing the expected usage is to write a shepherd service.
Looks to me like almost everyone using Guix uses shepherd / mcron, not systemd.
I hacked something together for systemd, but haven't published it.
Also, it looks like you're not using Guix home, which I think is the best way
to use Guix on a foreign distro.
So I suggest looking into that:
https://guix.gnu.org/manual/en/html_node/Home-Configuration.html
> 2. Is it possible to make systemd in Ubuntu aware that there might be
> user services in =~/.guix-profile/lib/systemd/user=? I want to do
> this in order to avoid the manual task of creating a symbolic link
> to the directory that is actually ser.
Yes. In ~/.config/systemd/user.conf (file probably doesn't exist yet):
[Manager]
ManagerEnvironment="XDG_DATA_DIRS=%h/.guix-profile/lib"
In case the %h doesn't work for you (depends on systemd version), write
/home/rodrigo (or whatever) instead.
After restarting the user session, it should pick up the unit files.
You can check the paths that are checked for user unit files with:
systemctl --user show -p UnitPath --value
and of course, the following:
systemctl --user list-unit-files "thunar*"
> Ideally, I want to install a
> package and just execute =systemctl --user start <<service>>=.
Just making sure, but are you sure you want to start, and not enable, or enable
--now?