summaryrefslogtreecommitdiff
path: root/users/gkleen@hel.nix
blob: 13607a9fe6a2bbf41d33339829f871d5274bd788 (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
52
53
54
55
56
57
58
59
60
61
{
  packageOverrides = pkgs: with pkgs; {
    chromium-wrapper = symlinkJoin {
      name = ''${chromium.name}-wrapped'';
      paths = [ chromium ];
      buildInputs = [ makeWrapper ];
      postBuild = ''
        wrapProgram $out/bin/chromium \
	  --add-flags --force-device-scale-factor=1.6
      '';
    };
    chrome-wrapper = symlinkJoin {
      name = ''${google-chrome-dev.name}-wrapped'';
      paths = [ google-chrome-dev ];
      buildInputs = [ makeWrapper ];
      postBuild = ''
        wrapProgram $out/bin/google-chrome-unstable \
	  --add-flags --force-device-scale-factor=1.6
        ln -s $out/bin/google-chrome-unstable $out/bin/chrome

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

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

      killall -s USR1 -u "$(whoami)" -- dunst
      $@
      killall -s USR2 -u "$(whoami)" -- dunst
    '';
    gajim = lib.overrideDerivation gajim (old: {
      enableNotifications = true;
      extraPythonPackages = (p: [ p.pygments ]);
    });
    haskellPackages = haskellPackages.override {
      overrides = self: super: with super; {
        extended-reals = haskell.lib.doJailbreak extended-reals;
        pandoc-crossref = haskell.lib.dontTest pandoc-crossref;
      } // (import ../custom/thermoprint { inherit pkgs; });
    };
  } // (import ../utils/nix/default.nix) {};

  allowUnfree = true;

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

  mpv = {
    vaapiSupport = true;
  };
}