home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit fcc04b7b8167d37e479a032f12473242e6e8ad49
parent 505db483debec5f105fee1e556a11d862d8ce150
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Thu,  1 Nov 2018 16:44:48 +0100

profiles: add containers

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Dcontainers.nix | 8--------
Mdevops.nix | 2+-
Mhokkaido.nix | 3+--
Mmodules/module-list.nix | 1+
Amodules/profiles/containers.nix | 35+++++++++++++++++++++++++++++++++++
Mshikoku.nix | 9++++-----
Mwakasu.nix | 6++++--
7 files changed, 46 insertions(+), 18 deletions(-)

diff --git a/containers.nix b/containers.nix @@ -1,8 +0,0 @@ -{ pkgs, prefix, ... }: - -{ - home.packages = with pkgs; [ - go-containerregistry - skopeo - ]; -} diff --git a/devops.nix b/devops.nix @@ -1,7 +1,7 @@ { pkgs, prefix, ... }: { - imports = [ ./containers.nix ./kubernetes.nix ./minikube.nix ]; + imports = [ ./kubernetes.nix ./minikube.nix ]; home.packages = with pkgs; [ google-cloud-sdk packer diff --git a/hokkaido.nix b/hokkaido.nix @@ -4,7 +4,6 @@ imports = [ ./desktop.nix # k8s - ./containers.nix ./kubernetes.nix ]; profiles.laptop.enable = true; @@ -15,8 +14,8 @@ python.enable = true; rust.enable = true; }; + profiles.containers.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 @@ -3,6 +3,7 @@ { imports = [ ./profiles/bash.nix + ./profiles/containers.nix ./profiles/desktop.nix ./profiles/dev.nix ./profiles/dev.go.nix diff --git a/modules/profiles/containers.nix b/modules/profiles/containers.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.profiles.containers; +in +{ + options = { + profiles.containers = { + enable = mkOption { + default = false; + description = "Enable containers profile"; + type = types.bool; + }; + podman = mkOption { + default = podman; + description = "Enable podman tools"; + type = types.bool; + }; + docker = mkOption { + default = false; + description = "Enable docker tools"; + type = types.bool; + }; + }; + config = mkIf cfg.enable { + profiles.docker.enable = cfg.docker; + profiles.podman.enalbe = cfg.podman || !cfg.docker; + home.packages = with pkgs; [ + go-containerregistry + skopeo + ]; + }; + }; +} diff --git a/shikoku.nix b/shikoku.nix @@ -16,12 +16,11 @@ python.enable = true; rust.enable = true; }; - profiles.docker.enable = true; + profiles.containers = { + enable = true; + docker = true; + }; programs.vscode.enable = true; - programs.podman.enable = true; - xdg.configFile."fish/conf.d/docker.fish".text = '' - set -gx DOCKER_BUILDKIT 1 - ''; home.packages = with pkgs; [ google-chrome obs-studio # screencast diff --git a/wakasu.nix b/wakasu.nix @@ -15,9 +15,11 @@ python.enable = true; rust.enable = true; }; - profiles.docker.enable = true; + profiles.containers = { + enable = true; + docker = true; + }; programs.vscode.enable = true; - programs.podman.enable = true; home.packages = with pkgs; [ google-chrome obs-studio