+builder for proxmox nixos-template
This commit is contained in:
41
flake.nix
41
flake.nix
@ -28,6 +28,11 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
|
||||
rose-pine-hyprcursor.url = "github:ndom91/rose-pine-hyprcursor";
|
||||
|
||||
@ -55,10 +60,31 @@
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
packages =
|
||||
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
packages = let
|
||||
# Import the regular packages for all systems
|
||||
regularPkgs = forAllSystems (
|
||||
system:
|
||||
import ./pkgs nixpkgs.legacyPackages.${system}
|
||||
);
|
||||
in
|
||||
regularPkgs
|
||||
// {
|
||||
x86_64-linux =
|
||||
regularPkgs.x86_64-linux
|
||||
// {
|
||||
# Build a QEMU image compatible with Proxmox using nixos-generators
|
||||
proxmox-hermes-image = inputs.nixos-generators.nixosGenerate {
|
||||
system = "x86_64-linux";
|
||||
format = "proxmox";
|
||||
modules = [
|
||||
./hosts/m3-hermes/default.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
overlays = import ./overlays {inherit inputs outputs;};
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
nixosConfigurations = {
|
||||
m3-ares = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
@ -98,15 +124,6 @@
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
m3-prox-pod = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/m3-prox-pod
|
||||
inputs.disko.nixosModules.disko
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
devShells.x86_64-linux.infraShell = let
|
||||
@ -115,7 +132,7 @@
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
opentofu
|
||||
nixos-anywhere.packages.x86_64-linux.nixos-anywhere
|
||||
nixos-anywhere
|
||||
];
|
||||
shellHook = ''
|
||||
echo "Infrastructure Management Shell"
|
||||
|
Reference in New Issue
Block a user