remove vm

This commit is contained in:
Ivan Kirilov Dimitrov 2024-07-06 19:47:30 +02:00
parent a66f628805
commit e79c4a0081
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294
3 changed files with 1 additions and 50 deletions

View File

@ -1,4 +1,4 @@
.PHONY: default all home nixos vm update clean
.PHONY: default all home nixos update clean
default: all
@ -10,9 +10,6 @@ home:
nixos:
doas nixos-rebuild switch --flake ./.
vm:
nixos-rebuild build-vm --flake ./.#vm
update:
nix flake update

View File

@ -44,15 +44,5 @@ in
};
modules = minimal ++ [ inputs.musnix.nixosModules.musnix ] ++ (with nixosModules; [ music ]);
});
vm = withSystem system (ctx@{ config, inputs', ... }:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs inputs';
packages = config.packages;
};
modules = [
inputs.hosts.nixosModule
] ++ (with nixosModules; [ vm base security testUser ]);
});
};
}

View File

@ -269,41 +269,5 @@ top@{ moduleWithSystem, ... }: {
ollama.enable = true;
};
});
vm = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
nixpkgs.hostPlatform = "x86_64-linux";
virtualisation.vmVariant = {
# following configuration is added only when building VM with build-vm
virtualisation = {
memorySize = 8192;
cores = 4;
resolution = {
x = 1920;
y = 1080;
};
diskImage = "$HOME/doc/vm.qcow2";
qemu = {
options = [ "-vga qxl" "-spice port=5900,addr=127.0.0.1,disable-ticketing=on" ];
};
};
services = {
displayManager.sddm.enable = true;
xserver = {
enable = true;
desktopManager.xfce.enable = true;
videoDrivers = [ "qxl" ];
};
spice-autorandr.enable = true;
spice-vdagentd.enable = true;
spice-webdavd.enable = true;
};
environment = {
systemPackages = with pkgs; [
xorg.xf86videoqxl
tor-browser
gnupg
];
};
};
});
};
}