about summary refs log tree commit diff
path: root/modules/nixos/profiles/dev/containers.nix
blob: d2a7d629cef010e96ac6a64a89e558a54663a9b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  config,
  lib,
  pkgs,
  ...
}:
with lib;
let
  cfg = config.nixfiles.modules.profiles.dev.containers;
in
{
  config = mkIf cfg.enable {
    nixfiles.modules = {
      common.shell.aliases.b = "buildah";
      podman.enable = true;
    };

    hm = {
      home = {
        sessionVariables.MINIKUBE_HOME = "${config.dirs.config}/minikube";

        packages = with pkgs; [ buildah ];
      };

      xdg.dataFile."minikube/config/config.json".text = generators.toJSON { } {
        config.Rootless = true;
        driver = "podman";
        container-runtime = "cri-o";
      };
    };
  };
}

Consider giving Nix/NixOS a try! <3