-
Notifications
You must be signed in to change notification settings - Fork 21
/
default.nix
30 lines (30 loc) · 881 Bytes
/
default.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
let
eval = import <nixpkgs/nixos> { configuration = ./configuration.nix; };
pkgs = eval.config._module.args.pkgs;
in rec {
tarball = eval.config.system.build.tarball;
cfg = { ... }: {
services.mingetty.autologinUser = "root";
virtualisation.memorySize = 2048;
services.xserver = {
enable = true;
displayManager.slim = {
enable = true;
autoLogin = true;
defaultUser = "root";
};
desktopManager.xfce.enable = true;
};
networking.hostName = "host";
environment.systemPackages = [ (
pkgs.writeScriptBin "doit" ''
cd /root
mkdir -p t
mount -t tmpfs none /root/t -o size=2048m
cd t
tar -xf ${eval.config.system.build.tarball}/tarball/nixos-system-x86_64-linux.tar.xz
''
) ];
};
test-guest = (import <nixpkgs/nixos> { configuration = cfg; }).vm;
}