Add output for nixos-generators
This commit is contained in:
		
					parent
					
						
							
								bff3ca1445
							
						
					
				
			
			
				commit
				
					
						fc50e78610
					
				
			
		
					 6 changed files with 72 additions and 6 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1 +1,2 @@
 | 
				
			||||||
.vscode
 | 
					.vscode
 | 
				
			||||||
 | 
					result
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										14
									
								
								configuration/nixos-generators/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								configuration/nixos-generators/default.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,14 @@
 | 
				
			||||||
 | 
					{ ... }:
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  boot.loader.grub = {
 | 
				
			||||||
 | 
					    enable = true;
 | 
				
			||||||
 | 
					    device = "/dev/vda";
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  networking = {
 | 
				
			||||||
 | 
					    hostName = "base";
 | 
				
			||||||
 | 
					    firewall.enable = true;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  system.stateVersion = "23.05";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,4 @@
 | 
				
			||||||
{ ... }:
 | 
					{ ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					 | 
				
			||||||
    ./hardware-configuration.nix
 | 
					 | 
				
			||||||
  ];
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  services.qemuGuest.enable = true;
 | 
					  services.qemuGuest.enable = true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
{ config, lib, pkgs, modulesPath, ... }:
 | 
					{ config, lib, modulesPath, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    (modulesPath + "/profiles/qemu-guest.nix")
 | 
					    (modulesPath + "/profiles/qemu-guest.nix")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										37
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										37
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							| 
						 | 
					@ -1,5 +1,41 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "nodes": {
 | 
					  "nodes": {
 | 
				
			||||||
 | 
					    "nixlib": {
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1689469483,
 | 
				
			||||||
 | 
					        "narHash": "sha256-2SBhY7rZQ/iNCxe04Eqxlz9YK9KgbaTMBssq3/BgdWY=",
 | 
				
			||||||
 | 
					        "owner": "nix-community",
 | 
				
			||||||
 | 
					        "repo": "nixpkgs.lib",
 | 
				
			||||||
 | 
					        "rev": "02fea408f27186f139153e1ae88f8ab2abd9c22c",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "nix-community",
 | 
				
			||||||
 | 
					        "repo": "nixpkgs.lib",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "nixos-generators": {
 | 
				
			||||||
 | 
					      "inputs": {
 | 
				
			||||||
 | 
					        "nixlib": "nixlib",
 | 
				
			||||||
 | 
					        "nixpkgs": [
 | 
				
			||||||
 | 
					          "nixpkgs"
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1690133435,
 | 
				
			||||||
 | 
					        "narHash": "sha256-YNZiefETggroaTLsLJG2M+wpF0pJPwiauKG4q48ddNU=",
 | 
				
			||||||
 | 
					        "owner": "nix-community",
 | 
				
			||||||
 | 
					        "repo": "nixos-generators",
 | 
				
			||||||
 | 
					        "rev": "b1171de4d362c022130c92d7c8adc4bf2b83d586",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "nix-community",
 | 
				
			||||||
 | 
					        "repo": "nixos-generators",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "nixpkgs": {
 | 
					    "nixpkgs": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1689679375,
 | 
					        "lastModified": 1689679375,
 | 
				
			||||||
| 
						 | 
					@ -18,6 +54,7 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "root": {
 | 
					    "root": {
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
 | 
					        "nixos-generators": "nixos-generators",
 | 
				
			||||||
        "nixpkgs": "nixpkgs"
 | 
					        "nixpkgs": "nixpkgs"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										20
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								flake.nix
									
										
									
									
									
								
							| 
						 | 
					@ -1,9 +1,13 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  inputs = {
 | 
					  inputs = {
 | 
				
			||||||
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
 | 
					    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
 | 
				
			||||||
 | 
					    nixos-generators = {
 | 
				
			||||||
 | 
					      url = "github:nix-community/nixos-generators";
 | 
				
			||||||
 | 
					      inputs.nixpkgs.follows = "nixpkgs";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  outputs = { self, nixpkgs, ... }: {
 | 
					  outputs = { self, nixpkgs, nixos-generators, ... }: {
 | 
				
			||||||
    hosts = {
 | 
					    hosts = {
 | 
				
			||||||
      nitter = {
 | 
					      nitter = {
 | 
				
			||||||
        site = "vs";
 | 
					        site = "vs";
 | 
				
			||||||
| 
						 | 
					@ -34,6 +38,7 @@
 | 
				
			||||||
      imports = [
 | 
					      imports = [
 | 
				
			||||||
        ./configuration/common
 | 
					        ./configuration/common
 | 
				
			||||||
        ./configuration/proxmox-vm
 | 
					        ./configuration/proxmox-vm
 | 
				
			||||||
 | 
					        ./configuration/proxmox-vm/hardware-configuration.nix
 | 
				
			||||||
        ./hosts/${name}
 | 
					        ./hosts/${name}
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
| 
						 | 
					@ -57,5 +62,18 @@
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Generate a base VM image for Proxmox with `nix build .#base-proxmox`
 | 
				
			||||||
 | 
					    packages.x86_64-linux = {
 | 
				
			||||||
 | 
					      base-proxmox = nixos-generators.nixosGenerate {
 | 
				
			||||||
 | 
					        system = "x86_64-linux";
 | 
				
			||||||
 | 
					        modules = [
 | 
				
			||||||
 | 
					          ./configuration/common
 | 
				
			||||||
 | 
					          ./configuration/nixos-generators
 | 
				
			||||||
 | 
					          ./configuration/proxmox-vm
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					        format = "proxmox";
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue