Skip to content

Commit

Permalink
kube3d: init (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurrriq committed May 19, 2021
1 parent 5e2bbee commit ab13ec8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions machines/sruxps/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
renderizer
scc
docker-credential-helpers
k3s
kube3d
kubectx
stern
zoom-us
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 @@ -144,6 +144,8 @@ docker-compose
\newthought{Install some convenient Kubernetes tools.}

<<Install some user packages>>=
k3s
kube3d
kubectx
stern
@
Expand Down
10 changes: 7 additions & 3 deletions src/modules/virtualisation.nw
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,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>>
};
Expand Down Expand Up @@ -33,8 +37,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

0 comments on commit ab13ec8

Please sign in to comment.