restructure
This commit is contained in:
@@ -2,19 +2,7 @@
|
||||
|
||||
flake.nixosModules.docker = { config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig.docker = {
|
||||
enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
nvidia = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.docker.enable {
|
||||
config = {
|
||||
|
||||
networking.nat.internalInterfaces = [ "docker0" "docker-main" ];
|
||||
|
||||
@@ -29,7 +17,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
hardware.nvidia-container-toolkit.enable = config.sysconfig.docker.nvidia;
|
||||
hardware.nvidia-container-toolkit.enable = lib.mkDefault (builtins.any
|
||||
(x: x == "nvidia")
|
||||
config.services.xserver.videoDrivers
|
||||
);
|
||||
|
||||
systemd.services."docker-network-setup" = {
|
||||
path = [ pkgs.docker ];
|
||||
|
||||
Reference in New Issue
Block a user