Skip to content

Commit 5c70079

Browse files
committed
Reduce jay-lenovo switch source builds
1 parent 74d5615 commit 5c70079

5 files changed

Lines changed: 335 additions & 304 deletions

File tree

nix-shared/system/essential.nix

Lines changed: 68 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,32 @@
22
pkgs,
33
lib,
44
inputs,
5+
config ? {},
56
...
67
}: let
78
system = pkgs.stdenv.hostPlatform.system;
9+
isJayLenovo = (config.networking.hostName or null) == "jay-lenovo";
810
inputPackageOrNull = inputName: packageName: let
911
input = inputs.${inputName} or null;
10-
packages = if input == null then null else input.packages or null;
11-
systemPackages = if packages == null then null else packages.${system} or null;
12+
packages =
13+
if input == null
14+
then null
15+
else input.packages or null;
16+
systemPackages =
17+
if packages == null
18+
then null
19+
else packages.${system} or null;
1220
in
13-
if systemPackages == null then null else systemPackages.${packageName} or null;
21+
if systemPackages == null
22+
then null
23+
else systemPackages.${packageName} or null;
1424

1525
git-blame-rank = inputs.git-blame-rank.packages.${system}.default.overrideAttrs (old: {
16-
env = (old.env or {}) // {
17-
CARGO_BUILD_JOBS = "1";
18-
};
26+
env =
27+
(old.env or {})
28+
// {
29+
CARGO_BUILD_JOBS = "1";
30+
};
1931
});
2032
coquiTtsStreamer = inputPackageOrNull "coqui-tts-streamer" "default";
2133
keepbook = inputs.keepbook.packages.${system}.keepbook.overrideAttrs (_: {
@@ -24,56 +36,56 @@
2436
});
2537

2638
commonPkgs = lib.filter (pkg: lib.meta.availableOn pkgs.stdenv.hostPlatform pkg) ((with pkgs; [
27-
automake
28-
bazel
29-
bento4
30-
bind
31-
binutils
32-
cachix
33-
bubblewrap
34-
cmake
35-
dex
36-
direnv
37-
fd
38-
ffmpeg
39-
file
40-
gawk
41-
gcc
42-
gh
43-
git-fame
44-
git-blame-rank
45-
git-lfs
46-
git-sync
47-
git
48-
gnumake
49-
home-manager
50-
htop
51-
ispell
52-
jq
53-
just
54-
keepbook
55-
lsof
56-
magic-wormhole-rs
57-
ncdu
58-
fastfetch
59-
neovim
60-
nix-index
61-
nix-search-cli
62-
pass
63-
patchelf
64-
pstree
65-
rclone
66-
ripgrep
67-
skim
68-
tmux
69-
zellij
70-
unzip
71-
wget
72-
xkcdpass
73-
yubikey-manager
74-
])
75-
++ lib.optionals (coquiTtsStreamer != null) [coquiTtsStreamer]
76-
++ lib.optionals (builtins.hasAttr "git-sync-rs" pkgs) [pkgs.git-sync-rs]);
39+
automake
40+
bento4
41+
bind
42+
binutils
43+
cachix
44+
bubblewrap
45+
cmake
46+
dex
47+
direnv
48+
fd
49+
ffmpeg
50+
file
51+
gawk
52+
gcc
53+
gh
54+
git-fame
55+
git-blame-rank
56+
git-lfs
57+
git-sync
58+
git
59+
gnumake
60+
home-manager
61+
htop
62+
ispell
63+
jq
64+
just
65+
keepbook
66+
lsof
67+
magic-wormhole-rs
68+
ncdu
69+
fastfetch
70+
neovim
71+
nix-index
72+
nix-search-cli
73+
pass
74+
patchelf
75+
pstree
76+
rclone
77+
ripgrep
78+
skim
79+
tmux
80+
zellij
81+
unzip
82+
wget
83+
xkcdpass
84+
yubikey-manager
85+
])
86+
++ lib.optionals (!isJayLenovo) [pkgs.bazel]
87+
++ lib.optionals (coquiTtsStreamer != null) [coquiTtsStreamer]
88+
++ lib.optionals (builtins.hasAttr "git-sync-rs" pkgs) [pkgs.git-sync-rs]);
7789

7890
linuxOnly = with pkgs; [
7991
dex

0 commit comments

Comments
 (0)