vm for testing

This commit is contained in:
Dmitriy Kholkin 2024-08-04 13:45:32 +03:00
parent 043d3f4852
commit 71a9792758
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
2 changed files with 24 additions and 0 deletions

View File

@ -186,6 +186,25 @@
}
);
packages.x86_64-linux = {
NixOS-VM = inputs.nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = builtins.attrValues self.customModules ++ [
(import (./machines/NixOS-VM))
{ device = "NixOS-VM"; mainuser = "ataraxia"; }
{ nixpkgs.config.allowUnfree = true; }
inputs.sops-nix.nixosModules.sops
];
specialArgs = {
inherit self inputs;
secrets = ./secrets;
self-nixpkgs = unstable-nixpkgs;
};
nixosSystem = unstable-system;
format = "vm";
};
};
deploy.nodes = withSystem "x86_64-linux" ({ ... }:
let
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;

View File

@ -9,12 +9,17 @@
inputs.self.customModules.devices
inputs.self.customProfiles.ccache
inputs.self.customModules.users
inputs.nixos-cosmic.nixosModules.default
];
virtualisation.memorySize = 4096;
virtualisation.cores = 4;
virtualisation.resolution.x = 1920;
virtualisation.resolution.y = 1080;
virtualisation.qemu.options = ["-vga none" "-device virtio-vga-gl" "-display gtk,gl=on"];
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
users.mutableUsers = false;
users.users.${config.mainuser} = {