From f3ccb9a449639fbfd49d011c12bcccd5779f68c7 Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:46:47 +0100 Subject: [PATCH] chore: apply new formatting rules --- packages/by-name/microsoft/cloud-hypervisor/package.nix | 4 +++- packages/by-name/nvidia-ctk-with-config/package.nix | 3 ++- packages/by-name/ociLayerTar/package.nix | 9 ++++++--- packages/nixos/gpu.nix | 3 ++- packages/nixos/kata.nix | 6 ++++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/packages/by-name/microsoft/cloud-hypervisor/package.nix b/packages/by-name/microsoft/cloud-hypervisor/package.nix index 2ab1a1f56b..6a836e6169 100644 --- a/packages/by-name/microsoft/cloud-hypervisor/package.nix +++ b/packages/by-name/microsoft/cloud-hypervisor/package.nix @@ -58,7 +58,9 @@ rustPlatform.buildRustPackage rec { "mshv" "kvm" ] - ++ lib.optional withIGVM "igvm" ++ lib.optional withSEVSNP "sev_snp" ++ lib.optional withTDX "tdx"; + ++ lib.optional withIGVM "igvm" + ++ lib.optional withSEVSNP "sev_snp" + ++ lib.optional withTDX "tdx"; OPENSSL_NO_VENDOR = true; diff --git a/packages/by-name/nvidia-ctk-with-config/package.nix b/packages/by-name/nvidia-ctk-with-config/package.nix index bdf57a1910..5f136e0c38 100644 --- a/packages/by-name/nvidia-ctk-with-config/package.nix +++ b/packages/by-name/nvidia-ctk-with-config/package.nix @@ -14,7 +14,8 @@ nvidia-container-toolkit.override { configTemplatePath = replaceVars ./config.toml { "nvidia-container-cli" = "${lib.getExe' libnvidia-container "nvidia-container-cli"}"; - "nvidia-container-runtime-hook" = "${lib.getExe' nvidia-container-toolkit "nvidia-container-runtime-hook"}"; + "nvidia-container-runtime-hook" = + "${lib.getExe' nvidia-container-toolkit "nvidia-container-runtime-hook"}"; "nvidia-ctk" = "${lib.getExe' nvidia-container-toolkit "nvidia-ctk"}"; "glibcbin" = "${lib.getBin glibc}"; }; diff --git a/packages/by-name/ociLayerTar/package.nix b/packages/by-name/ociLayerTar/package.nix index 318f3f0957..c6a70b7239 100644 --- a/packages/by-name/ociLayerTar/package.nix +++ b/packages/by-name/ociLayerTar/package.nix @@ -36,9 +36,12 @@ runCommandLocal "ociLayer" ); mediaType = "application/vnd.oci.image.layer.v1.tar" + (if compression == "" then "" else "+" + compression); - nativeBuildInputs = [ - nix - ] ++ lib.optional (compression == "gzip") gzip ++ lib.optional (compression == "zstd") zstd; + nativeBuildInputs = + [ + nix + ] + ++ lib.optional (compression == "gzip") gzip + ++ lib.optional (compression == "zstd") zstd; inherit compression; } '' diff --git a/packages/nixos/gpu.nix b/packages/nixos/gpu.nix index d64404960f..f54051d3de 100644 --- a/packages/nixos/gpu.nix +++ b/packages/nixos/gpu.nix @@ -40,7 +40,8 @@ in }; hardware.nvidia-container-toolkit.enable = true; - image.repart.partitions."10-root".contents."/usr/share/oci/hooks/prestart/nvidia-container-toolkit.sh".source = lib.getExe pkgs.nvidia-ctk-oci-hook; + image.repart.partitions."10-root".contents."/usr/share/oci/hooks/prestart/nvidia-container-toolkit.sh".source = + lib.getExe pkgs.nvidia-ctk-oci-hook; boot.initrd.kernelModules = [ # Extra kernel modules required to talk to the GPU in CC-Mode. diff --git a/packages/nixos/kata.nix b/packages/nixos/kata.nix index 753db39634..7e7a63feac 100644 --- a/packages/nixos/kata.nix +++ b/packages/nixos/kata.nix @@ -88,7 +88,9 @@ in networking.resolvconf.enable = false; - environment.etc."resolv.conf".text = "dummy file, to be bind-mounted by the Kata agent when writing network configuration"; - environment.etc."kata-opa/default-policy.rego".source = "${pkgs.kata-runtime.src}/src/kata-opa/allow-set-policy.rego"; + environment.etc."resolv.conf".text = + "dummy file, to be bind-mounted by the Kata agent when writing network configuration"; + environment.etc."kata-opa/default-policy.rego".source = + "${pkgs.kata-runtime.src}/src/kata-opa/allow-set-policy.rego"; }; }