diff options
| author | seth <[email protected]> | 2024-06-30 09:56:30 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-06-30 10:23:04 -0400 |
| commit | 088facf700946cb8f2d96c6089185bdc2a67180a (patch) | |
| tree | c5b4e4cffbb3ee4ad2498c2251892bd457e9d3c7 /modules/nixos/traits/containers.nix | |
| parent | 5d3045a0769af3a94fba7b5cf646e8498aaef595 (diff) | |
alejandra -> nixfmt-rfc-style
Diffstat (limited to 'modules/nixos/traits/containers.nix')
| -rw-r--r-- | modules/nixos/traits/containers.nix | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/nixos/traits/containers.nix b/modules/nixos/traits/containers.nix index 5170c34..d13c658 100644 --- a/modules/nixos/traits/containers.nix +++ b/modules/nixos/traits/containers.nix @@ -4,10 +4,12 @@ options, pkgs, ... -}: let +}: +let cfg = config.traits.containers; - enableNvidia = lib.elem "nvidia" (config.services.xserver.videoDrivers or []); -in { + enableNvidia = lib.elem "nvidia" (config.services.xserver.videoDrivers or [ ]); +in +{ options.traits.containers = { enable = lib.mkEnableOption "containers support"; }; @@ -18,7 +20,7 @@ in { virtualisation = { podman = { enable = true; - extraPackages = with pkgs; [podman-compose]; + extraPackages = with pkgs; [ podman-compose ]; autoPrune.enable = true; }; @@ -26,9 +28,7 @@ in { }; } - (lib.mkIf enableNvidia { - hardware.nvidia-container-toolkit.enable = true; - }) + (lib.mkIf enableNvidia { hardware.nvidia-container-toolkit.enable = true; }) ] ); } |
