From 797075634ca9c741c48c7733c81c920384d1ae86 Mon Sep 17 00:00:00 2001 From: "getchoo-bot[bot]" <183349775+getchoo-bot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 21:04:48 +0000 Subject: flake: update nixpkgs (#476) * flake: update nixpkgs * nixos/containers: set `hardware.nvidia-container-toolkit` in nvidia module --------- Co-authored-by: getchoo-bot[bot] <183349775+getchoo-bot[bot]@users.noreply.github.com> Co-authored-by: seth --- modules/nixos/traits/containers.nix | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'modules/nixos/traits/containers.nix') diff --git a/modules/nixos/traits/containers.nix b/modules/nixos/traits/containers.nix index 407ee51..b684803 100644 --- a/modules/nixos/traits/containers.nix +++ b/modules/nixos/traits/containers.nix @@ -10,29 +10,17 @@ in { options.traits.containers = { enable = lib.mkEnableOption "support for containers"; - enableNvidia = lib.mkEnableOption "the use of nvidia-container-toolkit" // { - default = lib.elem "nvidia" config.services.xserver.videoDrivers; - defaultText = lib.literalExpression '' - lib.elem "nvidia" config.services.xserver.videoDrivers - ''; - }; }; - config = lib.mkIf cfg.enable ( - lib.mkMerge [ - { - virtualisation = { - podman = { - enable = true; - extraPackages = [ pkgs.podman-compose ]; - autoPrune.enable = true; - }; - - oci-containers.backend = "podman"; - }; - } + config = lib.mkIf cfg.enable { + virtualisation = { + podman = { + enable = true; + extraPackages = [ pkgs.podman-compose ]; + autoPrune.enable = true; + }; - (lib.mkIf cfg.enableNvidia { hardware.nvidia-container-toolkit.enable = true; }) - ] - ); + oci-containers.backend = "podman"; + }; + }; } -- cgit v1.2.3