User avatar
φ @fiore@brain.worm.pink
1y
how do u make unit files in nixos ? do u just write the files , or does it have its own special way
2
0
0
0
User avatar
Two Hollywood Phonies @autumn@cafe.autumn.town
1y
@fiore

the way services work is that you define the service you want by giving it a name and then there are nix options that you edit to let it do what you need, looks like it's the same for units.

search.nixos.org/options?channel=25.05&from=0&size=50&sort=relevance&type=packages&query=systemd.units
1
0
1
0
User avatar
Two Hollywood Phonies @autumn@cafe.autumn.town
1y
@fiore e.g my markov bot's service is just this:
systemd.user.services.markov = {
    serviceConfig = {
      Type = "oneshot";
    };
    script = ''
        ${pkgs.nix}/bin/nix develop git+file:///storage/containers/autumnated/ --command python /storage/containers/autumnated/markov/generate.py 
    '';
  };
0
0
2
0