-
Notifications
You must be signed in to change notification settings - Fork 0
/
overlay.nix
86 lines (73 loc) · 2.19 KB
/
overlay.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
final: prev: with prev; {
## do NOT overlay `nix`, otherwise issues may propagate!
home-manager = (home-manager.override {
## option inspection does not work for flakes
## so simply drop this dependency to save space
nixos-option = null;
# /** use GNU's hostname as it's more powerful */
# unixtools.hostname = inetutils;
}).overrideAttrs {
/** fix hostname issues */
# src = fetchFromGitHub {
# name = "home-manager-source";
# owner = "nix-community";
# repo = "home-manager";
# rev = "97069e11282bd586fb46e3fa4324d651668e1886";
# hash = "sha256-otzfwp5EpQ6mlnASeGu0uSKoatlQnBvLv/f4JP+WtfA=";
# };
};
v2ray = runCommand "${v2ray.name}-rewrapped"
{
nativeBuildInputs = [ buildPackages.makeBinaryWrapper ];
}
''
mkdir -p $out/bin
cd $out/bin
makeBinaryWrapper \
"${final.undoWrapProgram v2ray}/bin/v2ray" \
"$out/bin/v2ray" \
--inherit-argv0 \
--suffix XDG_DATA_DIRS : "${v2ray.assetsDrv}/share"
'';
neovim = neovim.override { withRuby = false; };
gimp-with-plugins = gimp-with-plugins.override {
plugins = with gimpPlugins; [ resynthesizer ];
};
redshift-vanilla = (redshift.override {
withGeolocation = false;
withAppIndicator = false;
}).overrideAttrs {
postFixup = ''
wrapPythonPrograms
makeBinaryWrapper \
"$out/bin/redshift" \
"$out/bin/.redshift-rewrapped" \
--inherit-argv0 \
"''${gappsWrapperArgs[@]}"
'';
};
redshift = let redshift = final.redshift-vanilla; in
symlinkJoin {
name = "${redshift.name}-rewrapped";
paths = [ redshift ];
postBuild = ''
cd $out/bin
rm redshift
mv .redshift-rewrapped redshift
'';
};
## override home environments
buildEnv = attrs:
if attrs.name or "" != "home-manager-path"
then buildEnv attrs
else
(buildEnv attrs).overrideAttrs (prevAttrs: {
## blacklist glibcLocales
disallowedRequisites = [ final.glibcLocales ] ++ (
prevAttrs.disallowedRequisites or [ ]
);
});
# chezmoi = final.callPackage ./chezmoi.nix {
# inherit (prev) chezmoi;
# };
}