Replace docker with podman
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
17
hosts/common/configs/system/podman/default.nix
Normal file
17
hosts/common/configs/system/podman/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
containers.enable = true;
|
||||
oci-containers.backend = "podman";
|
||||
podman.enable = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
persistence."/persist"."/var/lib/containers" = { };
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
podman-compose
|
||||
dive
|
||||
];
|
||||
};
|
||||
}
|
19
hosts/common/configs/user/console/podman/default.nix
Normal file
19
hosts/common/configs/user/console/podman/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
services.podman.enable = true;
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
podman-compose
|
||||
dive
|
||||
];
|
||||
|
||||
sessionVariables.REGISTRY_AUTH_FILE = "${home}/.config/containers/auth.json";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user