From 20ab45931c8d99622cd8db033087b77136884e55 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Mon, 1 Apr 2024 23:31:54 -0400 Subject: [PATCH] lxd: move to by-name and format --- .../lx/lxd/package.nix} | 124 +++++++++++------- pkgs/top-level/all-packages.nix | 2 - 2 files changed, 75 insertions(+), 51 deletions(-) rename pkgs/{tools/admin/lxd/wrapper.nix => by-name/lx/lxd/package.nix} (50%) diff --git a/pkgs/tools/admin/lxd/wrapper.nix b/pkgs/by-name/lx/lxd/package.nix similarity index 50% rename from pkgs/tools/admin/lxd/wrapper.nix rename to pkgs/by-name/lx/lxd/package.nix index 9edfefd57ccd..e2c337351dd5 100644 --- a/pkgs/tools/admin/lxd/wrapper.nix +++ b/pkgs/by-name/lx/lxd/package.nix @@ -1,40 +1,41 @@ -{ lib -, lxd-unwrapped -, linkFarm -, makeWrapper -, stdenv -, symlinkJoin -, writeShellScriptBin -, acl -, apparmor-parser -, apparmor-profiles -, attr -, bash -, btrfs-progs -, cdrkit -, criu -, dnsmasq -, e2fsprogs -, getent -, gnutar -, gptfdisk -, gzip -, iproute2 -, iptables -, kmod -, lvm2 -, minio -, nftables -, OVMF -, qemu_kvm -, qemu-utils -, rsync -, spice-gtk -, squashfsTools -, thin-provisioning-tools -, util-linux -, virtiofsd -, xz +{ + lib, + lxd-unwrapped, + linkFarm, + makeWrapper, + stdenv, + symlinkJoin, + writeShellScriptBin, + acl, + apparmor-parser, + apparmor-profiles, + attr, + bash, + btrfs-progs, + cdrkit, + criu, + dnsmasq, + e2fsprogs, + getent, + gnutar, + gptfdisk, + gzip, + iproute2, + iptables, + kmod, + lvm2, + minio, + nftables, + OVMF, + qemu_kvm, + qemu-utils, + rsync, + spice-gtk, + squashfsTools, + thin-provisioning-tools, + util-linux, + virtiofsd, + xz, }: let binPath = lib.makeBinPath [ @@ -70,9 +71,7 @@ let '') ]; - clientBinPath = [ - spice-gtk - ]; + clientBinPath = [ spice-gtk ]; ovmf-2mb = OVMF.override { secureBoot = true; @@ -89,16 +88,43 @@ let # mimic ovmf from https://github.com/canonical/lxd-pkg-snap/blob/3abebe1dfeb20f9b7729556960c7e9fe6ad5e17c/snapcraft.yaml#L378 # also found in /snap/lxd/current/share/qemu/ on a snap install ovmf = linkFarm "lxd-ovmf" [ - { name = "OVMF_CODE.2MB.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } - { name = "OVMF_CODE.4MB.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } - { name = "OVMF_CODE.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } + { + name = "OVMF_CODE.2MB.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; + } + { + name = "OVMF_CODE.4MB.fd"; + path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_CODE.fd"; + } + { + name = "OVMF_CODE.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; + } - { name = "OVMF_VARS.2MB.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.2MB.ms.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.4MB.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.4MB.ms.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.ms.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } + { + name = "OVMF_VARS.2MB.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.2MB.ms.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.4MB.fd"; + path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.4MB.ms.fd"; + path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } + { + name = "OVMF_VARS.ms.fd"; + path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; + } ]; in symlinkJoin { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85fbdd5ff5cf..67dd6f629f63 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10576,8 +10576,6 @@ with pkgs; lxc = callPackage ../os-specific/linux/lxc { }; - lxd = callPackage ../tools/admin/lxd/wrapper.nix { }; - lxd-image-server = callPackage ../tools/virtualization/lxd-image-server { }; lzfse = callPackage ../tools/compression/lzfse { };