-
Notifications
You must be signed in to change notification settings - Fork 0
/
overlays.nix
65 lines (56 loc) · 1.8 KB
/
overlays.nix
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
{ inputs, lib, ... }:
with lib;
with lib.my;
let
privateRepo = pkgs.importPkgs ./pkgs;
wittanoOverlay = _: _: privateRepo;
haskellPackagesOverlay = final: prev: {
haskellPackages = prev.haskellPackages.extend
(self: super: {
xmonad-extras = (self.callHackage "xmonad-extras" "0.17.1" { }).overrideAttrs {
patches = [ ./patches/xmonad-extras.patch ];
};
});
};
commonInputs = with pkgs; [ libnotify coreutils ];
packagesPatches = final: prev: {
timeNotify = pkgs.writeShellApplication {
name = "time-notify";
runtimeInputs = commonInputs;
text = ''
notify-send -t 2000 "$(date)"
'';
};
showVolume = pkgs.writeShellApplication {
name = "show-volume";
runtimeInputs = commonInputs;
text = ''
notify-send -t 2000 "Volume: $(amixer sget Master | awk -F"[][]" '/Left:/ { print $2 }')";
'';
};
signal-desktop = prev.signal-desktop.overrideAttrs (oldAttrs: {
preFixup = oldAttrs.preFixup + ''
substituteInPlace $out/share/applications/${oldAttrs.pname}.desktop \
--replace "$out/bin/${oldAttrs.pname}" "$out/bin/${oldAttrs.pname} --use-tray-icon"
'';
});
jetbrains = prev.jetbrains // {
goland = prev.jetbrains.goland.overrideAttrs (attrs: {
postFixup = (attrs.postFixup or "") + lib.optionalString final.stdenv.isLinux ''
if [ -f $out/goland/plugins/go-plugin/lib/dlv/linux/dlv ]; then
rm $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
fi
ln -s ${final.delve}/bin/dlv $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
'';
});
};
};
in
{
overlay = wittanoOverlay;
systemOverlays = inputs.xmonad-contrib.overlays ++ [
wittanoOverlay
haskellPackagesOverlay
packagesPatches
];
}