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 {
|
2021-10-07 13:44:57 +00:00
|
|
|
systemd.services.display-manager.serviceConfig = {
|
|
|
|
StartLimitBurst = 16;
|
|
|
|
StartLimitIntervalSec = 4;
|
|
|
|
};
|
|
|
|
|
2021-02-01 15:45:49 +00:00
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
layout = "us,ru"; # see also home-manager.nix
|
|
|
|
xkbOptions = "ctrl:nocaps,grp:rctrl_toggle"; # see also home-manager.nix
|
|
|
|
windowManager.xmonad = {
|
|
|
|
enable = true;
|
|
|
|
enableContribAndExtras = true;
|
|
|
|
};
|
2022-09-24 14:37:07 +00:00
|
|
|
dpi = 282; # 15.6 inch, 3840x2160, comment out in case of nvidia
|
2021-02-01 15:45:49 +00:00
|
|
|
};
|
2019-05-31 00:02:30 +00:00
|
|
|
|
2022-09-24 14:37:07 +00:00
|
|
|
#services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
|
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;
|
|
|
|
|
2022-09-24 14:37:07 +00:00
|
|
|
hardware.opengl.enable = true;
|
|
|
|
hardware.opengl.extraPackages = [ pkgs.vaapiVdpau 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;
|
2021-10-07 13:46:24 +00:00
|
|
|
settings = {
|
2020-03-19 08:35:08 +00:00
|
|
|
General = {
|
|
|
|
Enable = "Source,Sink,Media,Socket";
|
|
|
|
};
|
|
|
|
};
|
2019-10-22 16:08:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardware.pulseaudio = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.pulseaudioFull;
|
|
|
|
};
|
|
|
|
# < bluetooth audio
|
2019-05-31 00:02:30 +00:00
|
|
|
|
|
|
|
environment.variables = {
|
|
|
|
GDK_SCALE = "2";
|
|
|
|
GDK_DPI_SCALE = "0.4";
|
|
|
|
};
|
|
|
|
|
|
|
|
fonts = {
|
2021-10-07 13:46:24 +00:00
|
|
|
fontDir.enable = true;
|
2019-05-31 00:02:30 +00:00
|
|
|
enableGhostscriptFonts = true;
|
|
|
|
fonts = with pkgs; [
|
|
|
|
ubuntu_font_family
|
2020-03-21 18:55:55 +00:00
|
|
|
noto-fonts-emoji
|
2022-09-24 14:37:07 +00:00
|
|
|
cantarell-fonts
|
2020-03-21 18:38:44 +00:00
|
|
|
cm_unicode
|
|
|
|
google-fonts
|
2020-03-21 18:42:55 +00:00
|
|
|
go-font
|
2020-05-31 08:30:03 +00:00
|
|
|
cm_unicode
|
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
|
|
|
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
|
2021-10-07 13:46:45 +00:00
|
|
|
"mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock
|
2022-09-24 14:37:07 +00:00
|
|
|
"gkmndgjgpolmikgnipipfekglbbgjcel" # AutoHideDownloadsBar
|
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;
|
2022-09-24 14:37:07 +00:00
|
|
|
# AudioCaptureAllowed = false;
|
|
|
|
# VideoCaptureAllowed = false;
|
2019-07-23 19:06:59 +00:00
|
|
|
SSLErrorOverrideAllowed = false;
|
|
|
|
AutoplayAllowed = false;
|
|
|
|
|
|
|
|
# 0 = Disable browser sign-in
|
|
|
|
BrowserSignin = 0;
|
|
|
|
|
2022-09-24 14:37:07 +00:00
|
|
|
#DefaultSearchProviderEnabled = true;
|
|
|
|
#DefaultSearchProviderSearchURL = "https://duckduckgo.com/"
|
|
|
|
#+ "?kae=d&k1=-1&kc=1&kav=1&kd=-1&kh=1&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
|
|
|
'';
|
|
|
|
}
|