Make docker optional
This commit is contained in:
parent
a68b429a58
commit
21a8f5a358
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
sbruder = {
|
sbruder = {
|
||||||
cpu.intel.enable = true;
|
cpu.intel.enable = true;
|
||||||
|
docker.enable = true;
|
||||||
games.enable = true;
|
games.enable = true;
|
||||||
gpu.intel.enable = true;
|
gpu.intel.enable = true;
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
sbruder = {
|
sbruder = {
|
||||||
cpu.intel.enable = true;
|
cpu.intel.enable = true;
|
||||||
|
docker.enable = true;
|
||||||
games.enable = true;
|
games.enable = true;
|
||||||
gpu.amd.enable = true;
|
gpu.amd.enable = true;
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# This uses a custom option (instead of `virtualisation.docker.enable`) since
|
||||||
|
# `virtualisation.oci-containers` conditionally sets
|
||||||
|
# `virtualisation.docker.enable` and therefore causes an infinite recursion.
|
||||||
|
options.sbruder.docker.enable = lib.mkEnableOption "docker with ipv6nat";
|
||||||
|
|
||||||
|
config = lib.mkIf config.sbruder.docker.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
docker-compose
|
docker-compose
|
||||||
docker-credential-helpers
|
docker-credential-helpers
|
||||||
|
@ -33,4 +39,5 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."modules-load.d/ipv6nat.conf".text = "ip6_tables\n";
|
environment.etc."modules-load.d/ipv6nat.conf".text = "ip6_tables\n";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue