Hacker News new | ask | show | jobs
by whateveracct 1291 days ago
I quite like systemd timers with NixOS (configured in the Nix language). They've become a standard hammer for me.
2 comments

Systemd and NixOS feels like a great fit. It is easier to configure than the real thing and also short scripts are easier to tie together with services and timers. All in one file instead of 2 or 3.
Nix/Guix users would think that way. They've alrady given up on the concept of system libraries or a unified OS. systemd's writing of 2 config files per timer would be right at home for people that have to set up an entire OS environment every time they want to try to compile something somone else hasn't already written a nix script for.
This would be needlessly insulting if it were posted as a top level comment, but as a direct reply to a Nix user it is impossible to read as anything other than the worst of condescension. Can you really say this is a net improvement to the tone of the conversation in this thread?
I'm responding to a Nix user making this about how Nix does timing. I'm relating it to the common thread of cargo cult'ing shared between systemd and users of Nix as desktop operating systems. They both increase the amount of config files necessary to accomplish what should be almost config-less tasks and spread those config files out across many places instead of a single config store that is for the entire OS.

It's bad policy for desktops even if it's good for you in work environments and so you use it anyway. Normalizing that is bad. I said it like a jerk though. Sorry.

Nix does have a single config that defines the entire OS though! Which seems to be what you want? It has imports I suppose but still.
Wouldn't be a systemd thread without shitposting in every other comment. Just flag and move on.
Joke's on you! Nix allows abstraction, so I just have a function

    mkTimer name schedule program
and it Just Works. You can even inline a bash script in the program argument if you want.
Roger that.

Did that feel cathartic?