appvm/os/configuration.nix

77 lines
1.8 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
let
2020-01-22 01:17:44 +00:00
appvm = (import ../default.nix);
in {
imports = [
2020-01-05 08:49:48 +00:00
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./target.nix
#./hardware-configuration.nix
];
time.timeZone = "UTC";
boot.loader.systemd-boot.enable = true;
# You can not use networking.networkmanager with networking.wireless
networking.wireless.enable = false;
users.users.user = {
isNormalUser = true;
2020-01-08 22:24:11 +00:00
initialPassword = "user"; # should be changed right after start
extraGroups = [ "audio" "libvirtd" ];
};
virtualisation.libvirtd = {
enable = true;
qemuVerbatimConfig = ''
namespaces = []
user = "user"
group = "users"
'';
};
2020-01-08 11:37:45 +00:00
systemd.user.services."dot-desktop-fuse" = {
serviceConfig = {
ExecStart = "${appvm}/bin/dot-desktop-fuse";
Restart = "on-failure";
};
path = [ "/run/wrappers" ];
wantedBy = [ "default.target" ];
};
2020-01-05 09:02:03 +00:00
systemd.user.services."autoballoon" = {
serviceConfig.StartLimitBurst = 64;
script = "${appvm}/bin/appvm autoballoon";
};
systemd.user.timers."autoballoon" = {
description = "Autoupdate resolution crutch";
timerConfig = {
OnBootSec = "1s";
OnUnitInactiveSec = "1s";
Unit = "autoballoon.service";
AccuracySec = "1us";
};
wantedBy = ["timers.target"];
};
environment.systemPackages = with pkgs; [
appvm virtmanager chromium
# Cache packages required for application VMs
2020-01-05 06:58:46 +00:00
xmonad-with-packages spice-vdagent bc qemu_test lightdm
];
services.xserver.enable = true;
services.xserver.displayManager.gdm = {
enable = true;
wayland = false; # FIXME
autoLogin = {
enable = true;
user = "user";
};
};
services.xserver.desktopManager.gnome3.enable = true;
}