1

vm: wiggle imports a bit

This commit is contained in:
Motiejus Jakštys 2024-01-16 11:41:15 +02:00
parent 994a4ad18b
commit 8909ef3fd5
2 changed files with 5 additions and 15 deletions

View File

@ -145,6 +145,7 @@
nixosConfigurations.vm = nixpkgs.lib.nixosSystem { nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
./vm.nix ./vm.nix
e11sync-module e11sync-module
]; ];

19
vm.nix
View File

@ -1,22 +1,12 @@
{ {pkgs, ...}: {
pkgs,
modulesPath,
...
}: {
e11sync.enable = true; e11sync.enable = true;
imports = [(modulesPath + "/virtualisation/qemu-vm.nix")];
virtualisation.graphics = false;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
tmux tmux
htop htop
]; ];
nix.extraOptions = '' nix.extraOptions = ''experimental-features = nix-command flakes'';
experimental-features = nix-command flakes
trusted-users = vm
'';
users = { users = {
mutableUsers = false; mutableUsers = false;
users.nixos = { users.nixos = {
@ -25,13 +15,12 @@
hashedPassword = ""; hashedPassword = "";
}; };
}; };
virtualisation.graphics = false;
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
services.getty.autologinUser = "nixos"; services.getty.autologinUser = "nixos";
networking = { networking = {
hostName = "vm"; hostName = "vm";
firewall = { firewall.allowedTCPPorts = [22 8001];
allowedTCPPorts = [8001];
};
}; };
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }