summaryrefslogtreecommitdiff
path: root/users/gkleen@hel.nix
blob: aff24e15e3bb4e2c534ff9c30f296bc0434a4049 (plain)
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
{
  packageOverrides = pkgs: rec {
    chromium-wrapper = pkgs.symlinkJoin {
      name = ''${pkgs.chromium.name}-wrapped'';
      paths = [ pkgs.chromium ];
      buildInputs = [ pkgs.makeWrapper ];
      postBuild = ''
        wrapProgram $out/bin/chromium \
	  --add-flags --force-device-scale-factor=1.6
      '';
    };
    chrome-wrapper = pkgs.symlinkJoin {
      name = ''${pkgs.google-chrome.name}-wrapped'';
      paths = [ pkgs.google-chrome ];
      buildInputs = [ pkgs.makeWrapper ];
      postBuild = ''
        wrapProgram $out/bin/google-chrome-stable \
	  --add-flags --force-device-scale-factor=1.6
        ln -s $out/bin/google-chrome-stable $out/bin/chrome

        rm $out/share/applications/google-chrome.desktop
        substitute ${pkgs.google-chrome}/share/applications/google-chrome.desktop $out/share/applications/google-chrome.desktop --replace "${pkgs.google-chrome}" "$out"
      '';
    };
    gnupg = pkgs.lib.overrideDerivation pkgs.gnupg (oldAttrs: {
      postInstall = ''
        ln -s $out/bin/gpg2 $out/bin/gpg
      '';
    });
    dunst-suspend = pkgs.writeScriptBin "dunst-suspend" ''
      #!${pkgs.stdenv.shell}

      export PATH=${pkgs.psmisc}/bin:$PATH

      killall -s USR1 -u "$(whoami)" -- dunst
      $@
      killall -s USR2 -u "$(whoami)" -- dunst
    '';
  } // (import ../utils/nix/default.nix) {};

  allowUnfree = true;

  chromium = {
    enableWideVine = true;
    hiDPI = true;
  };

  mpv = {
    vaapiSupport = true;
  };
}