commit 2aa4298266d019657081ffc561ae2316950de333
parent 9d00ea2ed70a88f22d214bdef12884aaf84b2c50
Author: Vincent Demeester <vincent@sbr.pm>
Date: Mon, 1 Jun 2020 14:14:26 +0200
systems/hokkaido: enable virtualisation.containers…
… and migrate kubernetes/openshift setup
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
7 files changed, 62 insertions(+), 5 deletions(-)
diff --git a/systems/hokkaido.nix b/systems/hokkaido.nix
@@ -43,4 +43,6 @@ in
mail.enable = enableHome;
yubikey.enable = true;
};
+
+ virtualisation.containers.enable = true;
}
diff --git a/users/vincent/containers/chos4.desktop b/users/vincent/containers/chos4.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=chos4
+Exec=chos4 install
+Type=Application
+Terminal=true
+Categories=System;
diff --git a/users/vincent/containers/default.nix b/users/vincent/containers/default.nix
@@ -0,0 +1,9 @@
+{ pkgs, ... }:
+
+{
+ imports = [
+ ./gcloud.nix
+ ./kubernetes.nix
+ ./openshift.nix
+ ];
+}
diff --git a/users/vincent/containers/gcloud.nix b/users/vincent/containers/gcloud.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+{
+ xdg.configFile."nr/gcloud" = {
+ text = builtins.toJSON [
+ { cmd = "gcloud"; pkg = "google-cloud-sdk"; }
+ { cmd = "gcsfuse"; }
+ ];
+ onChange = "${pkgs.my.nr}/bin/nr gcloud";
+ };
+}
diff --git a/users/vincent/containers/kubernetes.nix b/users/vincent/containers/kubernetes.nix
@@ -0,0 +1,15 @@
+{ pkgs, ... }:
+
+{
+ home.packages = with pkgs; [
+ #cri-tools
+ kail
+ # kubectl # FIXME this goes against oc
+ kustomize
+ kubectx
+ my.ko
+ my.krew
+ my.kss
+ my.kubernix
+ ];
+}
diff --git a/users/vincent/containers/openshift.nix b/users/vincent/containers/openshift.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+{
+ home.file.".local/share/applications/chos4.desktop".source = ./chos4.desktop;
+ home.packages = with pkgs; [
+ my.crc
+ my.oc
+ #my.openshift-install
+ my.operator-sdk
+ ];
+}
diff --git a/users/vincent/default.nix b/users/vincent/default.nix
@@ -27,11 +27,14 @@ with lib;
(import ../modules)
(import ./core)
]
- ++ optionals config.profiles.dev.enable [
- (import ./dev)
- ]
- ++ optionals config.profiles.desktop.enable [
- (import ./desktop)
+ ++ optionals config.profiles.dev.enable [ (import ./dev) ]
+ ++ optionals config.profiles.desktop.enable [ (import ./desktop) ]
+ ++ optionals config.profiles.docker.enable [{
+ home.packages = with pkgs; [ docker docker-compose ];
+ }]
+ ++ optionals (config.virtualisation.containers.enable && config.profiles.dev.enable) [
+ (import ./containers)
]
+ # TODO: mpd
);
}