2019-05-31 00:02:30 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2019-06-21 18:58:57 +00:00
|
|
|
let
|
2020-03-21 18:38:44 +00:00
|
|
|
nonfree = import <nixos> { config.allowUnfree = true; };
|
2019-06-21 18:58:57 +00:00
|
|
|
secrets = import ./secrets.nix;
|
|
|
|
in {
|
2019-05-31 00:02:30 +00:00
|
|
|
services.xserver.enable = true;
|
2019-07-21 14:55:53 +00:00
|
|
|
services.xserver.layout = "us,ru"; # see also home-manager.nix
|
|
|
|
services.xserver.xkbOptions = "ctrl:nocaps,grp:rctrl_toggle"; # see also home-manager.nix
|
2019-05-31 00:02:30 +00:00
|
|
|
services.xserver.windowManager.xmonad.enable = true;
|
|
|
|
services.xserver.windowManager.xmonad.enableContribAndExtras = true;
|
2019-07-25 06:39:31 +00:00
|
|
|
services.xserver.dpi = 282; # 15.6 inch, 3840x2160
|
2019-05-31 00:02:30 +00:00
|
|
|
|
2019-07-12 17:03:43 +00:00
|
|
|
services.xserver.xautolock = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
time = 5; # minutes
|
2020-01-06 15:29:14 +00:00
|
|
|
locker = "${pkgs.xsecurelock}/bin/xsecurelock";
|
2019-07-12 17:03:43 +00:00
|
|
|
|
|
|
|
notify = 10; # seconds
|
|
|
|
notifier = "${pkgs.libnotify}/bin/notify-send \"Locking in 10 seconds\"";
|
|
|
|
|
|
|
|
extraOptions = [ "-secure" ];
|
|
|
|
};
|
|
|
|
|
2019-10-13 18:54:03 +00:00
|
|
|
location = {
|
2019-06-21 18:58:57 +00:00
|
|
|
latitude = secrets.latitude;
|
|
|
|
longitude = secrets.longitude;
|
|
|
|
};
|
|
|
|
|
2019-10-13 18:54:03 +00:00
|
|
|
services.redshift = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2019-05-31 00:02:30 +00:00
|
|
|
programs.dconf.enable = true;
|
|
|
|
programs.light.enable = true;
|
|
|
|
|
2019-07-25 06:39:31 +00:00
|
|
|
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
|
2019-05-31 00:02:30 +00:00
|
|
|
|
|
|
|
sound.enable = true;
|
2019-10-22 16:08:01 +00:00
|
|
|
|
|
|
|
# > bluetooth audio
|
|
|
|
services.blueman.enable = true;
|
|
|
|
|
|
|
|
hardware.bluetooth = {
|
|
|
|
enable = true;
|
2020-03-19 08:35:08 +00:00
|
|
|
config = {
|
|
|
|
General = {
|
|
|
|
Enable = "Source,Sink,Media,Socket";
|
|
|
|
};
|
|
|
|
};
|
2019-10-22 16:08:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardware.pulseaudio = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.pulseaudioFull;
|
|
|
|
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
|
|
|
};
|
|
|
|
# < bluetooth audio
|
2019-05-31 00:02:30 +00:00
|
|
|
|
|
|
|
environment.variables = {
|
|
|
|
GDK_SCALE = "2";
|
|
|
|
GDK_DPI_SCALE = "0.4";
|
|
|
|
};
|
|
|
|
|
|
|
|
fonts = {
|
|
|
|
enableFontDir = true;
|
|
|
|
enableGhostscriptFonts = true;
|
|
|
|
fonts = with pkgs; [
|
|
|
|
ubuntu_font_family
|
2020-03-21 18:38:44 +00:00
|
|
|
cantarell_fonts
|
|
|
|
cm_unicode
|
|
|
|
google-fonts
|
2020-03-21 18:42:55 +00:00
|
|
|
go-font
|
2020-03-21 18:38:44 +00:00
|
|
|
|
|
|
|
nonfree.corefonts
|
2019-05-31 00:02:30 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.etc."X11/xorg.conf.d/60-trackball.conf".text = ''
|
|
|
|
Section "InputClass"
|
|
|
|
Identifier "Marble Mouse"
|
|
|
|
MatchProduct "Logitech USB Trackball"
|
|
|
|
MatchIsPointer "on"
|
|
|
|
MatchDevicePath "/dev/input/event*"
|
|
|
|
Driver "evdev"
|
|
|
|
|
|
|
|
Option "ButtonMapping" "3 8 1 4 5 6 7 2 2"
|
|
|
|
Option "EmulateWheel" "true"
|
|
|
|
Option "EmulateWheelButton" "9"
|
|
|
|
Option "EmulateWheelInertia" "10"
|
|
|
|
Option "ZAxisMapping" "4 5"
|
|
|
|
Option "Emulate3Buttons" "true"
|
|
|
|
EndSection
|
|
|
|
'';
|
|
|
|
|
|
|
|
environment.etc."X11/xorg.conf.d/61-trackpoint.conf".text = ''
|
|
|
|
Section "InputClass"
|
|
|
|
Identifier "Trackpoint Wheel Emulation"
|
|
|
|
Driver "evdev"
|
|
|
|
MatchProduct "TPPS/2 Elan TrackPoint"
|
|
|
|
MatchDevicePath "/dev/input/event*"
|
|
|
|
|
|
|
|
Option "EmulateWheel" "true"
|
|
|
|
Option "EmulateWheelButton" "2"
|
|
|
|
Option "Emulate3Buttons" "false"
|
|
|
|
Option "XAxisMapping" "6 7"
|
|
|
|
Option "YAxisMapping" "4 5"
|
|
|
|
Option "Device Accel Constant Deceleration" "0.5"
|
|
|
|
EndSection
|
|
|
|
'';
|
|
|
|
|
2019-07-29 06:09:46 +00:00
|
|
|
services.udev.extraHwdb = ''
|
|
|
|
keyboard:usb:*
|
|
|
|
evdev:input:*
|
|
|
|
KEYBOARD_KEY_700E7=rightctrl # Super_R -> Control_R
|
2019-09-07 08:24:52 +00:00
|
|
|
KEYBOARD_KEY_7B=leftalt # Muhenkan -> Alt_R
|
|
|
|
KEYBOARD_KEY_38=muhenkan # Alt_R -> Muhenkan
|
2019-09-10 10:00:52 +00:00
|
|
|
KEYBOARD_KEY_70=rightalt # KATAKANAHIRAGANA -> Alt_R
|
2019-07-29 06:09:46 +00:00
|
|
|
'';
|
|
|
|
|
2019-05-31 00:02:30 +00:00
|
|
|
services.xserver.displayManager.lightdm = {
|
|
|
|
background = "black";
|
2020-03-19 08:36:16 +00:00
|
|
|
greeters.enso.enable = true;
|
2019-05-31 00:02:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.chromium = {
|
|
|
|
enable = true;
|
|
|
|
extensions = [
|
|
|
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
|
2019-08-22 22:13:47 +00:00
|
|
|
"gcbommkclmclpchllfjekcdonpmejbdp" # HTTPS Everywhere
|
2019-05-31 00:02:30 +00:00
|
|
|
"dbepggeogbaibhgnhhndojpepiihcmeb" # Vimium
|
|
|
|
"aapbdbdomjkkjkaonfhkkikfgjllcleb" # Google Translate
|
|
|
|
"naepdomgkenhinolocfifgehidddafch" # Browserpass
|
2019-10-13 17:22:02 +00:00
|
|
|
"fihnjjcciajhdojfnbdddfaoknhalnja" # I don't care about cookies
|
2019-11-19 16:31:38 +00:00
|
|
|
"kbfnbcaeplbcioakkpcpgfkobkghlhen" # Grammarly
|
2019-05-31 00:02:30 +00:00
|
|
|
];
|
2019-07-23 19:06:59 +00:00
|
|
|
extraOpts = {
|
|
|
|
DefaultBrowserSettingEnabled = true;
|
|
|
|
|
|
|
|
TranslateEnabled = false;
|
|
|
|
SpellcheckEnabled = false;
|
|
|
|
SpellCheckServiceEnabled = false;
|
2019-07-24 00:25:49 +00:00
|
|
|
PrintingEnabled = false;
|
2019-07-23 19:06:59 +00:00
|
|
|
SearchSuggestEnabled = false;
|
|
|
|
PasswordManagerEnabled = false;
|
2019-07-24 00:25:49 +00:00
|
|
|
SafeBrowsingEnabled = false;
|
2019-07-23 19:06:59 +00:00
|
|
|
AutofillAddressEnabled = false;
|
2019-07-24 00:25:49 +00:00
|
|
|
AutofillCreditCardEnabled = false;
|
2019-07-24 00:26:02 +00:00
|
|
|
MetricsReportingEnabled = false;
|
2019-07-24 00:33:55 +00:00
|
|
|
BuiltInDnsClientEnabled = false;
|
2019-07-24 00:42:10 +00:00
|
|
|
EnableMediaRouter = false;
|
2019-07-24 00:45:49 +00:00
|
|
|
PromotionalTabsEnabled = false;
|
2019-07-23 19:06:59 +00:00
|
|
|
|
|
|
|
SyncDisabled = true;
|
|
|
|
|
|
|
|
SigninAllowed = false;
|
|
|
|
AudioCaptureAllowed = false;
|
|
|
|
VideoCaptureAllowed = false;
|
|
|
|
SSLErrorOverrideAllowed = false;
|
|
|
|
AutoplayAllowed = false;
|
|
|
|
|
|
|
|
# 0 = Disable browser sign-in
|
|
|
|
BrowserSignin = 0;
|
|
|
|
|
|
|
|
DefaultSearchProviderEnabled = true;
|
2020-03-20 09:43:40 +00:00
|
|
|
DefaultSearchProviderSearchURL = "https://www.google.com/"
|
|
|
|
+ "search?gl=us&gws_rd=cr&q={searchTerms}";
|
2019-07-23 19:06:59 +00:00
|
|
|
|
|
|
|
# Do not allow any site to show desktop notifications
|
|
|
|
DefaultNotificationsSetting = 2;
|
|
|
|
# Do not allow any site to track the users' physical location
|
|
|
|
DefaultGeolocationSetting = 2;
|
|
|
|
# Block the Flash plugin
|
|
|
|
DefaultPluginsSetting = 2;
|
|
|
|
};
|
2019-05-31 00:02:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.localCommands = ''
|
|
|
|
mkdir -p /tmp/chromium && chown user:users /tmp/chromium
|
2019-07-18 20:09:24 +00:00
|
|
|
mkdir -p /tmp/downloads && chown user:users /tmp/downloads
|
2019-05-31 00:02:30 +00:00
|
|
|
'';
|
|
|
|
}
|