Skip to content

hjem systemd should link individual service files instead of the ~/.config/systemd/user folder #76

@fred21O4

Description

@fred21O4

I use clobberByDefault = true, and I also create systemd user services outside of nix in ~/.config/systemd/user
When I started using hjem I noticed my user services had disappeared.
It seems currently that hjem links the entire ~/.config/systemd/user folder instead of individual files and due to hjem.user.<name>.systemd.enable being true by default, even without any services configured, hjem will replace ~/.config/systemd/user with an empty folder.
This will most likely not occur with clobberByDefault = false, however I believe it would be preferable to be able to use hjem systemd alongside imperative systemd user units.

hjem should probably be changed to link individual service files instead of the entire folder, especially if hjem.user.<name>.systemd.enable is on by default as it was surprising to me that it even touched my services without any configured in hjem.

I will be happy to work on a pr that changes this behaviour if it is a desired change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions