{ description = "A simple system flake using some Aux defaults"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; microvm.url = "github:astro/microvm.nix"; microvm.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs@{ nixpkgs, home-manager, microvm, ... }: let system = "x86_64-linux"; username = "tbarnouin"; in { nixosConfigurations = { nixos = nixpkgs.lib.nixosSystem { inherit system; modules = [ ./configuration.nix { networking.hostName = "nixos"; } home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.${username} = import ./home.nix; } microvm.nixosModules.host { microvm = { autostart = [ "nginx" ]; vms = { nginx = { flake = self; updateFlake = "git+file:///etc/nixos"; }; }; }; } ]; specialArgs = { inherit inputs; inherit username; }; }; nginx = nixpkgs.lib.nixosSystem { inherit system; modules = [ microvm.nixosModules.microvm "${inputs.self}/systems" "${inputs.self}/services" { services.vm_nginx = { enable = true; }; services.vm = { enable = true; hostname = "nginx"; vm_ip = "192.168.122.40"; macAddr = "02:00:00:00:00:40"; }; } ]; }; }; }; }