Unverified Commit e3fcac5e authored by Emily's avatar Emily Committed by GitHub
Browse files

lxd: remove packages and modules (#441370)

parents 3cefce33 1a1fdf64
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -818,7 +818,7 @@ with lib.maintainers;
      megheaiulian
      mkg20001
    ];
    scope = "All things linuxcontainers. LXC, Incus, LXD and related packages.";
    scope = "All things linuxcontainers. Incus, LXC, and related packages.";
    shortName = "lxc";
  };

+2 −0
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@

- The `services.polipo` module has been removed as `polipo` is unmaintained and archived upstream.

- `virtualisation.lxd` has been removed due to lack of Nixpkgs maintenance. Users can migrate to `virtualisation.incus`, a fork of LXD, as a replacement. See [Incus migration documentation](https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/) for migration information.

- The non-LTS Forgejo package (`forgejo`) has been updated to 12.0.0. This release contains breaking changes, see the [release blog post](https://forgejo.org/2025-07-release-v12-0/)
  for all the details and how to ensure smooth upgrades.

+0 −34
Original line number Diff line number Diff line
# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ modulesPath, ... }:

{
  imports = [
    # Include the default lxd configuration.
    "${modulesPath}/virtualisation/lxc-container.nix"
    # Include the container-specific autogenerated configuration.
    ./lxd.nix
  ];

  networking = {
    dhcpcd.enable = false;
    useDHCP = false;
    useHostResolvConf = false;
  };

  systemd.network = {
    enable = true;
    networks."50-eth0" = {
      matchConfig.Name = "eth0";
      networkConfig = {
        DHCP = "ipv4";
        IPv6AcceptRA = true;
      };
      linkConfig.RequiredForOnline = "routable";
    };
  };

  system.stateVersion = "@stateVersion@"; # Did you read the comment?
}
+0 −48
Original line number Diff line number Diff line
{ lib, pkgs, ... }:

{
  imports = [
    ../../../modules/virtualisation/lxc-container.nix
  ];

  virtualisation.lxc.templates.nix = {
    enable = true;
    target = "/etc/nixos/lxd.nix";
    template = ./nix.tpl;
    when = [
      "create"
      "copy"
    ];
  };

  # copy the config for nixos-rebuild
  system.activationScripts.config =
    let
      config = pkgs.replaceVars ./lxd-container-image-inner.nix {
        stateVersion = lib.trivial.release;
      };
    in
    ''
      if [ ! -e /etc/nixos/configuration.nix ]; then
        install -m 0644 -D ${config} /etc/nixos/configuration.nix
      fi
    '';

  networking = {
    dhcpcd.enable = false;
    useDHCP = false;
    useHostResolvConf = false;
  };

  systemd.network = {
    enable = true;
    networks."50-eth0" = {
      matchConfig.Name = "eth0";
      networkConfig = {
        DHCP = "ipv4";
        IPv6AcceptRA = true;
      };
      linkConfig.RequiredForOnline = "routable";
    };
  };
}
+0 −34
Original line number Diff line number Diff line
# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ modulesPath, ... }:

{
  imports = [
    # Include the default lxd configuration.
    "${modulesPath}/virtualisation/lxd-virtual-machine.nix"
    # Include the container-specific autogenerated configuration.
    ./lxd.nix
  ];

  networking = {
    dhcpcd.enable = false;
    useDHCP = false;
    useHostResolvConf = false;
  };

  systemd.network = {
    enable = true;
    networks."50-enp5s0" = {
      matchConfig.Name = "enp5s0";
      networkConfig = {
        DHCP = "ipv4";
        IPv6AcceptRA = true;
      };
      linkConfig.RequiredForOnline = "routable";
    };
  };

  system.stateVersion = "@stateVersion@"; # Did you read the comment?
}
Loading