| 1 |
# This file can be used with `nixops` to create a virtual machine that has |
| 2 |
# Termonad installed. |
| 3 |
# |
| 4 |
# I use this to test out Termonad in a desktop environment with a menubar. |
| 5 |
# |
| 6 |
# On my development machine, I use XMonad as a Window Manager, so there are |
| 7 |
# no Window decorations for any X application. This file creates a VM |
| 8 |
# with Termonad installed in Gnome 3. This lets you see what Termonad |
| 9 |
# looks like when it has Window decorations, a title bar, etc. |
| 10 |
# |
| 11 |
# A virtual machine can be created based on this file with the following |
| 12 |
# commands: |
| 13 |
# |
| 14 |
# $ nixops create --deployment termonad-test .nix-helpers/nixops.nix |
| 15 |
# $ nixops deploy --deployment termonad-test |
| 16 |
# |
| 17 |
# This should open up a VirtualBox machine and start installing Gnome 3, |
| 18 |
# Termonad, etc. |
| 19 |
# |
| 20 |
# You should be able to login with the username "myuser" and password "foobar". |
| 21 |
# |
| 22 |
# When you are done you can destroy the machine and delete the deployment: |
| 23 |
# |
| 24 |
# $ nixops destroy --deployment termonad-test |
| 25 |
# $ nixops delete --deployment termonad-test |
| 26 |
# |
| 27 |
|
| 28 |
{ |
| 29 |
network.description = "Gnome With Termonad"; |
| 30 |
|
| 31 |
termonad-machine = |
| 32 |
{ config, pkgs, ...}: |
| 33 |
{ |
| 34 |
imports = [ ]; |
| 35 |
|
| 36 |
deployment = { |
| 37 |
targetEnv = "virtualbox"; |
| 38 |
virtualbox = { |
| 39 |
disks.disk1.size = 20480; |
| 40 |
headless = false; |
| 41 |
memorySize = 2024; |
| 42 |
vcpu = 1; |
| 43 |
}; |
| 44 |
}; |
| 45 |
|
| 46 |
environment = { |
| 47 |
systemPackages = |
| 48 |
let |
| 49 |
pkgList = with pkgs; [ |
| 50 |
acpi aspell aspellDicts.en autojump bash bash-completion bc |
| 51 |
chromium curl dmenu emacs evince file firefoxWrapper gcc geeqie |
| 52 |
gimp gitAndTools.gitFull gitAndTools.hub gnumake gnupg hexchat |
| 53 |
htop imagemagick jq k2pdfopt ltrace manpages ncurses |
| 54 |
nix-bash-completions nixops p7zip pkgconfig psmisc python3 |
| 55 |
redshift roxterm screen strace tree unzip usbutils vimHugeX wget |
| 56 |
wirelesstools xfce.terminal xorg.xbacklight xorg.xmodmap |
| 57 |
xscreensaver xterm zlib |
| 58 |
]; |
| 59 |
termonad = import ../default.nix { }; |
| 60 |
in [ termonad ] ++ pkgList; |
| 61 |
variables.EDITOR = "vim"; |
| 62 |
}; |
| 63 |
|
| 64 |
fonts.fonts = with pkgs; [ |
| 65 |
dejavu_fonts ipafont source-code-pro ttf_bitstream_vera |
| 66 |
]; |
| 67 |
|
| 68 |
i18n = { |
| 69 |
consoleFont = "Lat2-Terminus16"; |
| 70 |
consoleKeyMap = "us"; |
| 71 |
defaultLocale = "en_US.UTF-8"; |
| 72 |
inputMethod = { |
| 73 |
enabled = "fcitx"; |
| 74 |
fcitx.engines = with pkgs.fcitx-engines; [ mozc ]; |
| 75 |
}; |
| 76 |
}; |
| 77 |
|
| 78 |
programs.bash.enableCompletion = true; |
| 79 |
|
| 80 |
services = { |
| 81 |
xserver = { |
| 82 |
enable = true; |
| 83 |
layout = "us"; |
| 84 |
desktopManager.gnome3.enable = true; |
| 85 |
}; |
| 86 |
openssh = { |
| 87 |
enable = true; |
| 88 |
forwardX11 = true; |
| 89 |
challengeResponseAuthentication = true; |
| 90 |
passwordAuthentication = true; |
| 91 |
permitRootLogin = "yes"; |
| 92 |
}; |
| 93 |
}; |
| 94 |
|
| 95 |
security.sudo = { |
| 96 |
enable = true; |
| 97 |
extraConfig = '' |
| 98 |
%wheel ALL=(ALL:ALL) NOPASSWD: ${pkgs.systemd}/bin/poweroff |
| 99 |
%wheel ALL=(ALL:ALL) NOPASSWD: ${pkgs.systemd}/bin/reboot |
| 100 |
%wheel ALL=(ALL:ALL) NOPASSWD: ${pkgs.systemd}/bin/systemctl suspend |
| 101 |
''; |
| 102 |
}; |
| 103 |
|
| 104 |
users.extraUsers.myuser = { |
| 105 |
extraGroups = [ "audio" "systemd-journal" "video" "wheel" ]; |
| 106 |
initialPassword = "foobar"; |
| 107 |
isNormalUser = true; |
| 108 |
}; |
| 109 |
}; |
| 110 |
} |