generate pxvirt lxc template tar

This commit is contained in:
Vinzenz Schroeter 2026-01-03 18:45:55 +01:00
parent 6bfa995c4d
commit 33f5a07af1
3 changed files with 61 additions and 0 deletions

37
flake.lock generated
View file

@ -440,6 +440,42 @@
"type": "github" "type": "github"
} }
}, },
"nixlib": {
"locked": {
"lastModified": 1736643958,
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1764234087,
"narHash": "sha256-NHF7QWa0ZPT8hsJrvijREW3+nifmF2rTXgS2v0tpcEA=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "032a1878682fafe829edfcf5fdfad635a2efe748",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1764522689, "lastModified": 1764522689,
@ -561,6 +597,7 @@
"niri": "niri", "niri": "niri",
"nix-filter": "nix-filter", "nix-filter": "nix-filter",
"nix-vscode-extensions": "nix-vscode-extensions", "nix-vscode-extensions": "nix-vscode-extensions",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur", "nur": "nur",

View file

@ -31,6 +31,10 @@
url = "github:nix-community/nix-vscode-extensions"; url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
nur = { nur = {
url = "github:nix-community/NUR"; url = "github:nix-community/NUR";
inputs = { inputs = {
@ -88,6 +92,7 @@
lanzaboote, lanzaboote,
niri, niri,
nix-vscode-extensions, nix-vscode-extensions,
nixos-generators,
nixpkgs-unstable, nixpkgs-unstable,
servicepoint-cli, servicepoint-cli,
servicepoint-simulator, servicepoint-simulator,
@ -236,5 +241,22 @@
formatting = treefmt-eval.config.build.check self; formatting = treefmt-eval.config.build.check self;
} }
); );
packages = forAllSystems (
{ ... }:
{
nixos-aarch64-pxvirt-lxc-template = nixos-generators.nixosGenerate {
system = "aarch64-linux";
format = "proxmox-lxc";
specialArgs = inputs // {
device = "nixos-aarch64-pxvirt-lxc-template";
};
modules = [
self.nixosModules.global-settings
self.nixosModules.pxvirt-guest
];
};
}
);
}; };
} }

View file

@ -62,5 +62,7 @@
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"mbedtls-2.28.10" "mbedtls-2.28.10"
]; ];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
}; };
} }