A nix flake to help you build systemd portable services.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
portable-svc/flake.nix

32 lines
830 B

{
description = "Nix tools to help you build portable services";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = { self, nixpkgs, ... }: {
overlay = final: prev: { portableService = prev.pkgs.callPackage ./. { }; };
packages.x86_64-linux.default = let
pkgs = import nixpkgs {
overlays = [ self.overlay ];
system = "x86_64-linux";
};
service = pkgs.substituteAll {
name = "tailscaled.service";
src = ./ts/tailscaled.service.in;
inherit (pkgs) tailscale;
};
in pkgs.portableService {
name = "tailscale";
version = pkgs.tailscale.version;
homepage = "https://tailscale.com";
units = [ service ];
symlinks = [{
object = "${pkgs.cacert}/etc/ssl";
symlink = "/etc/ssl";
}];
};
};
}