mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
podman: ensure openssh is available in PATH
Specifically, the machine initialization command `podman machine init` requires `ssh-keygen` to generate keys, but `openssh` may not be available in the system `PATH` by default. This change ensures `openssh` is available before attempting to create podman machines. Resolves #9325
This commit is contained in:
committed by
Robert Helgesson
parent
f968ed5961
commit
736c2084ea
@@ -198,6 +198,20 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = with pkgs; [
|
||||
openssh
|
||||
];
|
||||
defaultText = lib.literalExpression "[ pkgs.openssh ]";
|
||||
example = lib.literalExpression ''
|
||||
with pkgs; [ openssh hello ];
|
||||
'';
|
||||
description = ''
|
||||
Extra packages added to {env}`PATH` when creating Podman machines.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
@@ -263,7 +277,14 @@ in
|
||||
'';
|
||||
in
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
PATH="${cfg.package}/bin:$PATH"
|
||||
PATH="${
|
||||
lib.makeBinPath (
|
||||
[
|
||||
cfg.package
|
||||
]
|
||||
++ cfg.extraPackages
|
||||
)
|
||||
}:$PATH"
|
||||
|
||||
${concatStringsSep "\n" (lib.mapAttrsToList mkMachineInitScript allMachines)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user