about summary refs log tree commit diff
path: root/nix/awesome.nix
blob: 5ef2fe53431349b5e0129cfcddd21d84a24a5dfe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{ pkgs, ... }:
{
  environment.systemPackages = with pkgs; let wee-slack = weechat.override {
    configure = { ... }: {
      scripts = [ weechatScripts.wee-slack ];
    };
  };
  in [
    aerc amfora calcurse dante mu ncdu ranger scrot senpai zathura
    arandr audacious kid3 qsynth rxvt-unicode
    clipbuzz keynav playerctl pulsemixer xclip xdotool xorg.xkill
    libreoffice liferea nheko tor-browser-bundle-bin wee-slack
    networkmanagerapplet nextcloud-client transmission-gtk
    gnome.adwaita-icon-theme qt5ct
  ];

  fonts.packages = with pkgs; [ lmodern noto-fonts-cjk-sans noto-fonts-emoji ];

  hardware.brillo.enable = true;

  i18n = {
    defaultLocale = "en_US.UTF-8";
    inputMethod = {
      enabled = "ibus";
      ibus.engines = with pkgs.ibus-engines; [
        hangul
        table table-others
      ];
    };
  };

  programs = {
    firefox = {
      enable = true;
      languagePacks = [ "en-US" "fr" "ko" "vi" ];
      policies = {
        ExtensionSettings = builtins.mapAttrs (id: name: {
          default_area = "menupanel";
          installation_mode = "normal_installed";
          install_url =
            "https://addons.mozilla.org/firefox"
            + "/downloads/latest/${name}/latest.xpi";
        }) {
          "{af37054b-3ace-46a2-ac59-709e4412bec6}" = "add-custom-search-engine";
          "{84b9a1d4-531b-4549-a328-63adf0d8f957}" = "alful";
          "FirefoxColor@mozilla.com" = "firefox-color";
          "{d66c8515-1e0d-408f-82ee-2682f2362726}" = "iina-open-in-mpv";
          "redirector@einaregilsson.com" = "redirector";
          "{b5501fd1-7084-45c5-9aa6-567c2fcf5dc6}" = "ruffle_rs";
          "{2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c}" = "search_by_image";
          "uBlock0@raymondhill.net" = "ublock-origin";
        };
        Handlers.scheme.mpv = {
          action = "useHelperApp";
          ask = false;
          handlers = [ {
            name = "open-in-mpv";
            path = "${pkgs.open-in-mpv}/bin/open-in-mpv";
          } ];
        };
        Preferences = {
          browser.aboutConfig.showWarning = false;
          dom.webnotifications.enabled = false;
          extensions = let mozzarella = "https://gnuzilla.gnu.org/mozzarella";
          in {
            getAddons = {
              link.url = mozzarella;
              search.browseURL = mozzarella + "/search.php?q=%TERMS%";
            };
            webservice.discoverURL = mozzarella;
          };
          widget = {
            gtk.overlay-scrollbars.enabled = false;
            non-native-theme.scrollbar.style = 1;
          };
        };
      };
    };
    mepo.enable = true;
    nm-applet.enable = true;
    slock.enable = true;
  };

  qt = {
    enable = true;
    platformTheme = "qt5ct";
  };

  services = {
    autorandr.enable = true;
    xserver = {
      videoDrivers = [ "intel" ];
      deviceSection = ''
        Option "TearFree" "true"
      '';

      enable = true;
      desktopManager.xterm.enable = false;
      displayManager.startx.enable = true;
      windowManager.awesome.enable = true;

      layout = "us";
      xkbOptions = "caps:ctrl_modifier,compose:menu";
      libinput.enable = true; # Enable touchpad support.
    };
  };
}