stuff
This commit is contained in:
parent
c59da0e4ba
commit
0a45d838ff
10 changed files with 246 additions and 52 deletions
13
common/virtualization/default.nix
Normal file
13
common/virtualization/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [./libvirt.nix ./podman.nix ./kubernetes.nix];
|
||||
|
||||
libvirt.enable = lib.mkDefault true;
|
||||
podman.enable = lib.mkDefault true;
|
||||
kubernetes.enable = lib.mkDefault true;
|
||||
}
|
||||
|
|
@ -1,18 +1,23 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
argocd # Declarative, GitOps continuous delivery tool for Kubernetes.
|
||||
k3d # Lightweight utility to run Kubernetes clusters using Docker.
|
||||
k9s # Kubernetes CLI to visually navigate and manage resources in clusters.
|
||||
kind # Kubernetes IN Docker: Tool for running local Kubernetes clusters using Docker container nodes.
|
||||
kubectl # Kubernetes command-line tool for interacting with clusters.
|
||||
kubectx # Switch between Kubernetes contexts and namespaces with ease.
|
||||
kubernetes-helm # Package manager for Kubernetes applications, simplifying deployment and management.
|
||||
minikube # Local Kubernetes cluster for easy testing and development.
|
||||
stern # Multi-container log tailing and streaming for Kubernetes.
|
||||
];
|
||||
options = {
|
||||
kubernetes.enable = lib.mkEnableOption "Enables Kubernetes and tooling";
|
||||
};
|
||||
config = lib.mkIf config.kubernetes.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
argocd # Declarative, GitOps continuous delivery tool for Kubernetes.
|
||||
k3d # Lightweight utility to run Kubernetes clusters using Docker.
|
||||
k9s # Kubernetes CLI to visually navigate and manage resources in clusters.
|
||||
kind # Kubernetes IN Docker: Tool for running local Kubernetes clusters using Docker container nodes.
|
||||
kubectl # Kubernetes command-line tool for interacting with clusters.
|
||||
kubectx # Switch between Kubernetes contexts and namespaces with ease.
|
||||
kubernetes-helm # Package manager for Kubernetes applications, simplifying deployment and management.
|
||||
minikube # Local Kubernetes cluster for easy testing and development.
|
||||
stern # Multi-container log tailing and streaming for Kubernetes.
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,16 @@
|
|||
config,
|
||||
pkgs,
|
||||
user,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
environment.systemPackages = with pkgs; [virt-manager];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
users.extraGroups.libvirtd.members = ["${user}"];
|
||||
options = {
|
||||
libvirt.enable = lib.mkEnableOption "Enables Libvirt";
|
||||
};
|
||||
config = lib.mkIf config.libvirt.enable {
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
environment.systemPackages = with pkgs; [virt-manager];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
users.extraGroups.libvirtd.members = ["${user}"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,35 @@
|
|||
{pkgs, ...}: {
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
|
||||
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||
dockerCompat = true;
|
||||
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
podman.enable = lib.mkEnableOption "Enables podman and installs container tools";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
buildah # Tool for building OCI (Open Container Initiative) and Docker container images.
|
||||
distrobox # Lightweight utility for running Linux distributions in containers.
|
||||
dive # A tool for exploring a Docker image, allowing inspection of layer contents.
|
||||
#grype # A vulnerability scanner for container images and filesystems.
|
||||
hadolint # Dockerfile linter to analyze and enforce best practices in containerization.
|
||||
podman-compose # Podman plugin for managing multi-container applications.
|
||||
podman-tui # Text-based user interface (TUI) for Podman, facilitating container management.
|
||||
syft # Open-source tool for scanning and analyzing container images for software composition and vulnerabilities.
|
||||
];
|
||||
config = lib.mkIf config.podman.enable {
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
|
||||
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||
dockerCompat = true;
|
||||
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
buildah # Tool for building OCI (Open Container Initiative) and Docker container images.
|
||||
distrobox # Lightweight utility for running Linux distributions in containers.
|
||||
dive # A tool for exploring a Docker image, allowing inspection of layer contents.
|
||||
grype # A vulnerability scanner for container images and filesystems.
|
||||
hadolint # Dockerfile linter to analyze and enforce best practices in containerization.
|
||||
podman-compose # Podman plugin for managing multi-container applications.
|
||||
podman-tui # Text-based user interface (TUI) for Podman, facilitating container management.
|
||||
syft # Open-source tool for scanning and analyzing container images for software composition and vulnerabilities.
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue