dotfiles/roles/graphical.nix

57 lines
1.5 KiB
Nix
Raw Normal View History

2017-02-02 16:31:19 +01:00
let secrets = import <secrets>;
in
2015-03-18 02:24:24 +01:00
{ config, lib, pkgs, ... }:
{
2017-02-02 16:31:19 +01:00
options.yorick.support32bit = with lib;
mkOption { type = types.bool; default = false; };
config = {
2015-03-18 02:24:24 +01:00
# Enable the X11 windowing system.
services.xserver = {
enable = true;
synaptics = {
twoFingerScroll = true;
horizontalScroll = true;
scrollDelta = -107; # inverted scrolling
2015-03-18 02:24:24 +01:00
};
2017-01-26 14:52:06 +01:00
libinput = {
naturalScrolling = true;
tappingDragLock = false;
};
2015-03-18 02:24:24 +01:00
layout = "us";
xkbOptions = "caps:escape";
2015-03-18 02:24:24 +01:00
displayManager.slim.defaultUser = "yorick";
# xkbOptions = "eurosign:e";
windowManager.i3 = {
enable = true;
} // (if (lib.versionAtLeast config.system.nixosRelease "17.03") then {
package = pkgs.i3-gaps;
} else {});
2015-03-18 02:24:24 +01:00
};
hardware.opengl = {
enable = true;
2017-02-02 16:31:19 +01:00
driSupport32Bit = config.yorick.support32bit;
2015-03-18 02:24:24 +01:00
};
2015-03-23 23:30:32 +01:00
hardware.pulseaudio.enable = true;
2017-02-02 16:31:19 +01:00
hardware.pulseaudio.support32Bit = config.yorick.support32bit;
2015-03-18 02:24:24 +01:00
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
corefonts # Micrsoft free fonts
inconsolata # monospaced
source-code-pro
ubuntu_font_family # Ubuntu fonts
2015-03-23 23:30:40 +01:00
source-han-sans-japanese
2017-04-08 23:20:11 +02:00
iosevka
2015-03-18 02:24:24 +01:00
];
};
# spotify
networking.firewall.allowedTCPPorts = [57621];
networking.firewall.allowedUDPPorts = [57621];
2017-02-02 16:31:19 +01:00
users.extraUsers.yorick.hashedPassword = secrets.yorick_hashedPassword;
2017-02-27 16:20:31 +01:00
services.openssh.forwardX11 = true;
2017-02-02 16:31:19 +01:00
};
2015-03-18 02:24:24 +01:00
}