Proxy Information
Original URL
gemini://gemini.kaction.cc/log/2020-02-14.1.gmi
Status Code
Success (20)
Meta
text/gemini # Managing system files with Nix It is possible to have derivation that builds some file for system directory in your `~/.config/nixpkgs/overrides`. It is more complicated than managing user personal files, but still major improvement over manual editing. For example, I can build `/var/service/user` service directory for system-wide `runit` installation with following command: ``` $ nix-build '' -A system.sv-user -o /tmp/sv-user ``` After that I move generated link to intended location in system directory, like following: ``` $ doas cp -vf /tmp/sv-user /var/service/user ``` Next, it is necessary to register final destination as Nix garbage collection root, otherwise the link will become dangling after garbage collection, which can be triggered by unprivileged user. ``` $ nix-store --add-root /var/service/user -r --indirect ``` When you update derivation for system-wide file, these three steps must to be performed again. It can be noted that this poor-man implementation of what `nixos-rebuild` in NixOS does. Unfortunately, NixOS depends on systemd heavily, and my experience suggests that it is much simplier to add missing feature to sound base system than eradicate bloatware specially designed to make it almost impossible.
Capsule Response Time
391.307301 milliseconds
Gemini-to-HTML Time
0.008046 milliseconds

This content has been proxied by September (ba2dc).