Merge pull request #113045 from zowoq/podman-systemd

podman: install systemd files
This commit is contained in:
adisbladis 2021-02-13 22:47:06 +01:00 committed by GitHub
commit 83be4f8ea2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View File

@ -105,6 +105,16 @@ in
})); }));
}; };
systemd.packages = [ cfg.package ];
systemd.services.podman.serviceConfig = {
ExecStart = [ "" "${cfg.package}/bin/podman $LOGGING system service" ];
};
systemd.sockets.podman.wantedBy = [ "sockets.target" ];
systemd.tmpfiles.packages = [ cfg.package ];
assertions = [ assertions = [
{ {
assertion = cfg.dockerCompat -> !config.virtualisation.docker.enable; assertion = cfg.dockerCompat -> !config.virtualisation.docker.enable;

View File

@ -63,6 +63,9 @@ buildGoModule rec {
installShellCompletion --fish completions/fish/* installShellCompletion --fish completions/fish/*
installShellCompletion --zsh completions/zsh/* installShellCompletion --zsh completions/zsh/*
MANDIR=$man/share/man make install.man-nobuild MANDIR=$man/share/man make install.man-nobuild
'' + lib.optionalString stdenv.isLinux ''
install -Dm644 contrib/tmpfile/podman.conf -t $out/lib/tmpfiles.d
install -Dm644 contrib/systemd/system/podman.{socket,service} -t $out/lib/systemd/system
''; '';
passthru.tests = { inherit (nixosTests) podman; }; passthru.tests = { inherit (nixosTests) podman; };

View File

@ -48,6 +48,7 @@ in runCommand podman.name {
ln -s ${podman.man} $man ln -s ${podman.man} $man
mkdir -p $out/bin mkdir -p $out/bin
ln -s ${podman-unwrapped}/lib $out/lib
ln -s ${podman-unwrapped}/share $out/share ln -s ${podman-unwrapped}/share $out/share
makeWrapper ${podman-unwrapped}/bin/podman $out/bin/podman \ makeWrapper ${podman-unwrapped}/bin/podman $out/bin/podman \
--prefix PATH : ${binPath} --prefix PATH : ${binPath}