nix-config: ef4cc9ef1a9e5fd7523889750fdac2d72b102ab9
1: # This one package depends on all of the packages we might want in a user
2: # profile so we don't need to keep track of everything separately. If you're on
3: # NixOS you can make these available using /etc/nixos/configuration.nix
4: # If you're using Nix standalone, or want per-user configuration, you can run
5: # a command like `nix-env -iA all` to install into your profile.
6: self: super:
7:
8: with builtins;
9: with super.lib;
10: with rec {
11: go =
12: name: paths:
13: assert
14: all isDerivation (attrValues paths)
15: || abort (toJSON {
16: inherit name;
17: error = "Non-derivation in dependencies of meta-package";
18: types = mapAttrs (_: typeOf) paths;
19: nonDrvs = mapAttrs (_: typeOf) (filterAttrs (_: x: !(isDerivation x)) paths);
20: });
21: (if elem name [ "docGui" ] then self.lowPrio else (x: x)) (
22: self.buildEnv {
23: inherit name;
24: paths = attrValues paths;
25: }
26: );
27:
28: fallbacks = {
29: inherit
30: (
31: rec {
32: inherit (import ../overrides/repos.nix overrides { }) overrides;
33: }
34: .overrides
35: )
36: nix-helpers
37: warbo-packages
38: ;
39: };
40:
41: nix-helper = h: getAttr h (if hasAttr h self then self else nix-helpers);
42: nix-helpers = self.nix-helpers or fallbacks.nix-helpers;
43: warbo-packages = self.warbo-packages or fallbacks.warbo-packages;
44: };
45: {
46: # Packages before a ### are included in the ones after
47: overrides = mapAttrs go {
48: haskellCli = {
49: inherit (self.haskellPackages) happy hasktags pretty-show;
50: inherit (self)
51: brittany
52: cabal-install
53: ghc
54: ghcid
55: hlint
56: pretty-derivation
57: stylish-haskell
58: ;
59: };
60:
61: ###
62:
63: devCli = {
64: inherit (self)
65: aws-sam-cli
66: awscli
67: binutils
68: coreutils
69: delta
70: direnv
71: entr
72: git
73: git-absorb
74: jq
75: msgpack-tools
76: nano
77: nix-top
78: nixfmt-rfc-style
79: python3
80: racket
81: silver-searcher
82: update-nix-fetchgit
83: vim
84: xidel
85: ;
86: inherit (self.python3Packages) black;
87: inherit (warbo-packages) artemis;
88: };
89:
90: devGui = {
91: inherit (self) emacs sqlitebrowser;
92: };
93:
94: docCli = {
95: inherit (self)
96: anonymousPro
97: bibclean
98: bibtool
99: ghostscript
100: md2pdf
101: nerdfonts
102: pandoc
103: poppler_utils
104: ;
105: inherit (warbo-packages) panpipe panhandle;
106: aspell = self.aspellWithDicts (dicts: [ dicts.en ]);
107: };
108:
109: docGui = {
110: inherit (self)
111: abiword
112: evince
113: gnumeric
114: gv
115: libreoffice
116: ;
117: inherit (self.xfce) mousepad;
118: inherit (warbo-packages) basket kbibtex_full;
119: mupdf = nix-helper "without" self.mupdf [
120: "bin/mupdf-gl"
121: "bin/mupdf-x11-curl"
122: ];
123: };
124:
125: games = {
126: inherit (self) gensgs;
127: };
128:
129: mediaCli = {
130: inherit (self)
131: chromaprint
132: alsa-utils
133: imagemagick
134: ffmpeg
135: opusTools
136: sox
137: yt-dlp
138: ;
139: };
140:
141: mediaGui = {
142: inherit (self)
143: audacious
144: cmus
145: gimp
146: mplayer
147: pamixer
148: paprefs
149: pavucontrol
150: picard
151: vlc
152: ;
153: };
154:
155: netCli = {
156: inherit (self)
157: aria2
158: autossh
159: curl
160: ddgr
161: gnutls
162: inetutils
163: msmtp
164: mu
165: pptp
166: sshuttle
167: w3m
168: wget
169: ;
170: };
171:
172: netGui = {
173: # NOTE: Some useful programs are not included, since it's better to use
174: # their associated 'programs.<foo>.enable' option in NixOS
175: inherit (self)
176: dillo
177: transmission_4-qt
178: uget
179: x11vnc
180: ;
181: };
182:
183: # Keep these separate, since they won't work on non-NixOS systems (binaries
184: # like fusermount need to be suid; NixOS has a workaround, other systems are
185: # better off using their native package)
186: inherit
187: (rec {
188: sysCli = sysCliNoFuse // {
189: inherit (self) fuse fuse3;
190: };
191:
192: sysCliNoFuse = {
193: inherit (self.xorg) xmodmap;
194: inherit (self)
195: acpi
196: binutils
197: cifs-utils
198: coreutils
199: dtach
200: dvtm
201: exfat
202: file
203: htop
204: inotify-tools
205: libnotify
206: lzip
207: nano
208: openssh
209: p7zip
210: pciutils
211: pmutils
212: psmisc
213: rclone
214: rsync
215: screen
216: smbnetfs
217: sshfs-fuse
218: ts
219: unzip
220: usbutils
221: xz
222: zbar
223: zip
224: ;
225: };
226: })
227: sysCli
228: sysCliNoFuse
229: ;
230:
231: sysGui =
232: self.iconThemes
233: // self.widgetThemes
234: // {
235: inherit (self.xfce) exo xfce4-notifyd;
236: inherit (self.xorg) xkill;
237: inherit (self)
238: arandr
239: asunder
240: awf
241: blueman
242: gcr
243: iotop
244: lxappearance
245: picom
246: rofi
247: st
248: trayer
249: wmname
250: xbindkeys
251: xcalib
252: xcape
253: xpra
254: xsettingsd
255: ;
256: inherit (self.libsForQt5) qt5ct qtstyleplugin-kvantum;
257: };
258:
259: ###
260:
261: allCli = {
262: inherit (self)
263: devCli
264: docCli
265: mediaCli
266: netCli
267: sysCli
268: ;
269: };
270:
271: allGui = {
272: inherit (self)
273: devGui
274: docGui
275: games
276: mediaGui
277: netGui
278: sysGui
279: ;
280: };
281:
282: ###
283:
284: allPkgs = {
285: inherit (self) allCli allGui;
286: };
287: };
288:
289: tests = {
290: all = nix-helper "hasBinary" self.allPkgs "firefox";
291: basic = nix-helper "hasBinary" self.allCli "ssh";
292: removals = self.runCommand "removed-undesirables" { inherit (self) allPkgs; } ''
293: FAIL=0
294: for F in bin/mupdf-gl bin/mupdf-x11-curl
295: do
296: if [[ -e "$all/$F" ]]
297: then
298: FAIL=1
299: echo "Found '$F', which should have been removed" 1>&2
300: fi
301: done
302: if [[ "$FAIL" -gt 0 ]]
303: then
304: echo "Removal didn't work" 1>&2
305: exit 1
306: fi
307: mkdir "$out"
308: '';
309: };
310: }
Generated by git2html.