-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvm.nix
53 lines (46 loc) · 1.3 KB
/
vm.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ config, pkgs, lib, ... }:
let
default = import ./default.nix;
sources = import ./nix/sources.nix;
in {
imports = [
"${sources.pkgs}/nixos/tests/common/user-account.nix"
"${sources.pkgs}/nixos/modules/profiles/qemu-guest.nix"
"${sources.pkgs}/nixos/modules/virtualisation/qemu-vm.nix"
"${sources.pkgs}/nixos/modules/virtualisation/virtualbox-image.nix"
];
# Pin nixpkgs
_module.args = {
inherit (default) pkgs;
};
services.xserver.enable = true;
services.xserver.displayManager = {
gdm = {
enable = true;
wayland = true;
};
autoLogin = {
enable = true;
user = "alice";
};
};
services.xserver.desktopManager.gnome = {
enable = true;
extraGSettingsOverrides = ''
[org.gnome.shell]
favorite-apps=['firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'gtkwave.desktop' ]
'';
};
environment.systemPackages = (with pkgs; [
firefox
(pkgs.makeAutostartItem {
name = "org.gnome.Terminal";
package = pkgs.gnome.gnome-terminal;
})
]) ++ (default.packages pkgs);
services.qemuGuest.enable = true;
virtualisation.memorySize = 2048;
virtualbox.baseImageSize = 60 * 1024;
virtualbox.params.usb = "off";
system.stateVersion = "21.05"; # Did you read the comment?
}