refactor(host/orion): improve virtualisation setup
This commit is contained in:
parent
1ce511e451
commit
946db03a5e
@ -1,21 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
docker
|
|
||||||
docker-compose
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
oci-containers.backend = "docker";
|
|
||||||
containers.enable = true;
|
|
||||||
docker = {
|
|
||||||
enable = true;
|
|
||||||
rootless = {
|
|
||||||
enable = true;
|
|
||||||
setSocketVariable = true;
|
|
||||||
};
|
|
||||||
autoPrune.enable = true;
|
|
||||||
package = pkgs.docker;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -16,6 +16,7 @@
|
|||||||
"wheel"
|
"wheel"
|
||||||
"keyd"
|
"keyd"
|
||||||
(lib.mkIf config.virtualisation.docker.enable "docker")
|
(lib.mkIf config.virtualisation.docker.enable "docker")
|
||||||
|
(lib.mkIf config.virtualisation.libvirtd.enable "libvirtd")
|
||||||
];
|
];
|
||||||
group = "price";
|
group = "price";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
|
16
hosts/orion/modules/virtualisation.nix
Normal file
16
hosts/orion/modules/virtualisation.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [ docker-compose ];
|
||||||
|
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
virtualisation = {
|
||||||
|
libvirtd.enable = true;
|
||||||
|
containers.enable = true;
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
autoPrune.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user