{ description = "System config"; inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { nixpkgs, home-manager, ... }@inputs: let inherit (nixpkgs) lib; util = import ./lib { inherit system pkgs home-manager lib; overlays = (pkgs.overlays); }; inherit (util) user; inherit (util) host; pkgs = import nixpkgs { inherit system; config.allowUnfree = true; overlays = [ ]; }; system = "x86_64-linux"; nixosConfig = { boot = { type = "qemu-bios"; qemu = true; grubInstallDevice = "/dev/vda"; }; core.enable = true; }; vm2Config = { boot = { type = "uefi"; qemu = true; }; core.enable = true; }; nixosUsers = [{ name = "erwin"; groups = [ "wheel" "networkmanager" "video" ]; uid = 1000; shell = pkgs.fish; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMNoTcRsAxDwpiIj6nhUXwzSQjtcgKCR0RDlzP57wi0W erwin@horusvr-ws2" ]; }]; in { homeManagerConfigurations = { erwin = user.mkHMUser { userConfig = { git.enable = true; ssh.enable = true; applications.enable = true; gpg.enable = true; fish.enable = true; }; username = "erwin"; }; }; nixosConfigurations = { vm1 = host.mkHost { name = "vm1"; NICs = [ "enp1s0" ]; kernelPackage = pkgs.linuxPackages; initrdMods = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" "virtio_net" "virtio_mmio" "virtio_scsi" "9p" "9pnet_virtio" ]; kernelMods = [ "kvm-amd" "virtio_balloon" "virtio_console" "virtio_rng" ]; kernelParams = [ ]; systemConfig = nixosConfig; users = nixosUsers; cpuCores = 6; }; vm2 = host.mkHost { name = "vm2"; NICs = [ "enp1s0" ]; kernelPackage = pkgs.linuxPackages; initrdMods = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" "virtio_net" "virtio_mmio" "virtio_scsi" "9p" "9pnet_virtio" ]; kernelMods = [ "kvm-amd" "virtio_balloon" "virtio_console" "virtio_rng" ]; kernelParams = [ ]; systemConfig = vm2Config; users = nixosUsers; cpuCores = 4; }; loki = host.mkHost { name = "loki"; NICs = [ "enp4s0" ]; kernelPackage = pkgs.linuxPackages; initrdMods = [ "nvme" "xhci_pci" "ahci" ]; kernelMods = [ "kvm-amd" ]; }; }; }; }