Skip to content

Commit

Permalink
[sruxps] feat: add kube3d
Browse files Browse the repository at this point in the history
  • Loading branch information
yurrriq committed May 2, 2023
1 parent f748d73 commit eefe981
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 @@ -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

0 comments on commit eefe981

Please sign in to comment.