Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sruxps] kube3d: init #18

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions machines/sruxps/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
scc
docker-credential-helpers
# TODO: podman-compose
k3s
krew
kube3d
kubectl
kubectx
kubelogin
Expand Down
6 changes: 5 additions & 1 deletion modules/virtualisation.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = lib.optionals config.virtualisation.podman.enable [ pkgs.crun ];
environment.systemPackages = lib.optionals config.virtualisation.podman.enable (with pkgs; [ crun tini ] );
virtualisation = {
containers.containersConf.extraConfig = ''
[containers]
init_path = "${pkgs.tini}/bin/tini"
'';
docker = {
enable = lib.mkDefault false;
liveRestore = lib.mkDefault false;
Expand Down
2 changes: 2 additions & 0 deletions src/machines/sruxps/home.nw
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ docker-compose
\newthought{Install some convenient Kubernetes tools.}

<<Install some user packages>>=
k3s
krew
kube3d
kubectl
kubectx
kubelogin
Expand Down
10 changes: 7 additions & 3 deletions src/modules/virtualisation.nw
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
<<modules/virtualisation.nix>>=
{ config, lib, pkgs, ... }:
{
<<Install crun>>
<<Install crun and tini>>
virtualisation = {
containers.containersConf.extraConfig = ''
[containers]
init_path = "${pkgs.tini}/bin/tini"
'';
<<Configure Docker>>
<<Configure Podman>>
<<Configure VirtualBox>>
Expand Down Expand Up @@ -35,8 +39,8 @@ It seems there is a bug in podman such that it doesn't properly handle
WARN[0000] Found default OCIruntime /nix/store/.../bin/crun path which is missing from [engine.runtimes] in containers.conf
\end{minted}

<<Install crun>>=
environment.systemPackages = lib.optionals config.virtualisation.podman.enable [ pkgs.crun ];
<<Install crun and tini>>=
environment.systemPackages = lib.optionals config.virtualisation.podman.enable (with pkgs; [ crun tini ] );
@

Install Podman by default, if the Docker daemon is disabled.
Expand Down