commit c9c081423d8ec45969953c6253d9348954d0234f
parent 7372e0a2f0e9755d9958a20b14877ee1ba120b19
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 1 Nov 2018 16:01:00 +0100
programs: add podman program
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
5 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/hokkaido.nix b/hokkaido.nix
@@ -15,6 +15,7 @@
rust.enable = true;
};
programs.vscode.enable = true;
+ programs.podman.enable = true;
home.packages = with pkgs; [
google-chrome
];
diff --git a/modules/module-list.nix b/modules/module-list.nix
@@ -20,6 +20,7 @@
./profiles/ssh.nix
./profiles/tmux.nix
./profiles/zsh.nix
+ ./programs/podman.nix
./programs/vscode.nix
./services/shairport-sync.nix
];
diff --git a/modules/programs/podman.nix b/modules/programs/podman.nix
@@ -0,0 +1,47 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+ cfg = config.programs.podman;
+in
+{
+ options = {
+ programs.podman = {
+ enable = mkOption {
+ default = false;
+ description = "Enable VS Code profile";
+ type = types.bool;
+ };
+ };
+ };
+ config = mkIf cfg.enable {
+ # FIXME(vdemeester) package podman and conmon in nixpkgs
+ xdg.configFile."containers/libpod.conf".text = ''
+ image_default_transport = "docker://"
+ runtime_path = ["/run/current-system/sw/bin/runc"]
+ conmon_path = ["/run/current-system/sw/bin/conmon"]
+ cni_plugin_dir = ["${pkgs.cni-plugins}/bin/"]
+ cgroup_manager = "systemd"
+ cni_config_dir = "/etc/cni/net.d/"
+ cni_default_network = "podman"
+ # pause
+ pause_image = "k8s.gcr.io/pause:3.1"
+ pause_command = "/pause"
+ '';
+
+ xdg.configFile."containers/registries.conf".text = ''
+ [registries.search]
+ registries = ['docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.access.redhat.com', 'registry.centos.org']
+ [registries.insecure]
+ registries = []
+ '';
+
+ xdg.configFile."containers/policy.json".text = ''
+ {
+ "default": [
+ { "type": "insecureAcceptAnything" }
+ ]
+ }
+ '';
+ };
+}
diff --git a/shikoku.nix b/shikoku.nix
@@ -17,6 +17,7 @@
rust.enable = true;
};
programs.vscode.enable = true;
+ programs.podman.enable = true;
xdg.configFile."fish/conf.d/docker.fish".text = ''
set -gx DOCKER_BUILDKIT 1
'';
diff --git a/wakasu.nix b/wakasu.nix
@@ -16,6 +16,7 @@
rust.enable = true;
};
programs.vscode.enable = true;
+ programs.podman.enable = true;
xdg.configFile."fish/conf.d/docker.fish".text = ''
set -gx DOCKER_BUILDKIT 1
'';