Created
February 26, 2018 09:45
-
-
Save cleverca22/2477211344d358476e805976c23657d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[clever@system76:~]$ nix-build unit.nix -o thing.service | |
/nix/store/xibndqk75icrnrf1rsc9jjq3x8a9mlgj-yourthing.service | |
[clever@system76:~]$ cat thing.service | |
[Unit] | |
Description=your thing | |
[Service] | |
ExecStart=/nix/store/kmwd1hq55akdb9sc7l3finr175dajlby-hello-2.10/bin/hello | |
[clever@system76:~]$ cat unit.nix | |
with import <nixpkgs> {}; | |
let | |
yourthing = callPackage ./yourthing.nix {}; | |
in writeText "yourthing.service" '' | |
[Unit] | |
Description=your thing | |
[Service] | |
ExecStart=${hello}/bin/hello | |
'' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment