···23with lib;
4let
5- findWinner = candidates: winner:
6- any (x: x == winner) candidates;
7-8- # winners is an ordered list where first item wins over 2nd etc
9- mergeAnswer = winners: locs: defs:
10- let
11- values = map (x: x.value) defs;
12- inter = intersectLists values winners;
13- winner = head winners;
14- in
15- if defs == [] then abort "This case should never happen."
16- else if winner == [] then abort "Give a valid list of winner"
17- else if inter == [] then mergeOneOption locs defs
18- else if findWinner values winner then
19- winner
20- else
21- mergeAnswer (tail winners) locs defs;
22-23 mergeFalseByDefault = locs: defs:
24 if defs == [] then abort "This case should never happen."
25 else if any (x: x == false) (getValues defs) then false
···28 kernelItem = types.submodule {
29 options = {
30 tristate = mkOption {
31- type = types.enum [ "y" "m" "n" null ] // {
32- merge = mergeAnswer [ "y" "m" "n" ];
33- };
34 default = null;
35 internal = true;
36 visible = true;
···23with lib;
4let
0000000000000000005 mergeFalseByDefault = locs: defs:
6 if defs == [] then abort "This case should never happen."
7 else if any (x: x == false) (getValues defs) then false
···10 kernelItem = types.submodule {
11 options = {
12 tristate = mkOption {
13+ type = types.enum [ "y" "m" "n" null ];
0014 default = null;
15 internal = true;
16 visible = true;
···42 homepage = "https://www.mopidy.com/";
43 description = ''
44 An extensible music server that plays music from local disk, Spotify,
45- SoundCloud, Google Play Music, and more
46 '';
47 license = licenses.asl20;
48 maintainers = [ maintainers.fpletz ];
···42 homepage = "https://www.mopidy.com/";
43 description = ''
44 An extensible music server that plays music from local disk, Spotify,
45+ SoundCloud, and more
46 '';
47 license = licenses.asl20;
48 maintainers = [ maintainers.fpletz ];
-45
pkgs/applications/audio/tuijam/default.nix
···1-{ buildPythonApplication
2-, fetchFromGitHub
3-, lib
4-, python3Packages
5-}:
6-7-buildPythonApplication rec {
8- pname = "tuijam";
9- version = "unstable-2020-06-05";
10-11- src = fetchFromGitHub {
12- owner = "cfangmeier";
13- repo = pname;
14- rev = "7baec6f6e80ee90da0d0363b430dd7d5695ff03b";
15- sha256 = "1l0s88jvj99jkxnczw5nfj78m8vihh29g815n4mg9jblad23mgx5";
16- };
17-18- buildInputs = [ python3Packages.Babel ];
19-20- # the package has no tests
21- doCheck = false;
22-23- propagatedBuildInputs = with python3Packages; [
24- gmusicapi
25- google-api-python-client
26- mpv
27- pydbus
28- pygobject3
29- pyyaml
30- requests
31- rsa
32- urwid
33- ];
34-35- meta = with lib; {
36- description = "A fancy TUI client for Google Play Music";
37- longDescription = ''
38- TUIJam seeks to make a simple, attractive, terminal-based interface to
39- listening to music for Google Play Music All-Access subscribers.
40- '';
41- homepage = "https://github.com/cfangmeier/tuijam";
42- license = licenses.mit;
43- maintainers = with maintainers; [ kalbasit ];
44- };
45-}
···193 NET_DROP_MONITOR = yes;
194195 # needed for ss
196+ # Use a lower priority to allow these options to be overridden in hardened/config.nix
197+ INET_DIAG = mkDefault module;
198+ INET_TCP_DIAG = mkDefault module;
199+ INET_UDP_DIAG = mkDefault module;
200+ INET_RAW_DIAG = whenAtLeast "4.14" (mkDefault module);
201+ INET_DIAG_DESTROY = whenAtLeast "4.9" (mkDefault yes);
202203 # enable multipath-tcp
204 MPTCP = whenAtLeast "5.6" yes;
205 MPTCP_IPV6 = whenAtLeast "5.6" yes;
206+ INET_MPTCP_DIAG = whenAtLeast "5.9" (mkDefault module);
207 };
208209 wireless = {
+9-1
pkgs/os-specific/linux/kernel/hardened/config.nix
···65 PANIC_TIMEOUT = freeform "-1";
6667 GCC_PLUGINS = yes; # Enable gcc plugin options
68- # Gather additional entropy at boot time for systems that may = no;ot have appropriate entropy sources.
69 GCC_PLUGIN_LATENT_ENTROPY = yes;
7071 GCC_PLUGIN_STRUCTLEAK = whenAtLeast "4.11" yes; # A port of the PaX structleak plugin
···78 ACPI_CUSTOM_METHOD = no; # Allows writing directly to physical memory
79 PROC_KCORE = no; # Exposes kernel text image layout
80 INET_DIAG = no; # Has been used for heap based attacks in the past
000000008182 # Use -fstack-protector-strong (gcc 4.9+) for best stack canary coverage.
83 CC_STACKPROTECTOR_REGULAR = whenOlder "4.18" no;
···65 PANIC_TIMEOUT = freeform "-1";
6667 GCC_PLUGINS = yes; # Enable gcc plugin options
68+ # Gather additional entropy at boot time for systems that may not have appropriate entropy sources.
69 GCC_PLUGIN_LATENT_ENTROPY = yes;
7071 GCC_PLUGIN_STRUCTLEAK = whenAtLeast "4.11" yes; # A port of the PaX structleak plugin
···78 ACPI_CUSTOM_METHOD = no; # Allows writing directly to physical memory
79 PROC_KCORE = no; # Exposes kernel text image layout
80 INET_DIAG = no; # Has been used for heap based attacks in the past
81+82+ # INET_DIAG=n causes the following options to not exist anymore, but since they are defined in common-config.nix,
83+ # make them optional
84+ INET_DIAG_DESTROY = option no;
85+ INET_RAW_DIAG = option no;
86+ INET_TCP_DIAG = option no;
87+ INET_UDP_DIAG = option no;
88+ INET_MPTCP_DIAG = option no;
8990 # Use -fstack-protector-strong (gcc 4.9+) for best stack canary coverage.
91 CC_STACKPROTECTOR_REGULAR = whenOlder "4.18" no;
+14-8
pkgs/servers/home-assistant/default.nix
···1-{ stdenv, nixosTests, lib, fetchFromGitHub, python3
0000023# Look up dependencies of specified components in component-packages.nix
4, extraComponents ? [ ]
···84 };
8586 # leave this in, so users don't have to constantly update their downstream patch handling
87- patches = [];
00000008889 postPatch = ''
90 substituteInPlace setup.py \
···331 # generic/test_camera.py: AssertionError: 500 == 200
332 "test_fetching_without_verify_ssl"
333 "test_fetching_url_with_verify_ssl"
334- ] ++ lib.optionals (stdenv.isAarch64) [
335- # tests getting stuck on aarch64
336- # components/stream/test_hls.py
337- "test_stream_ended"
338- # components/stream/test_recorder.py
339- "test_record_stream"
340 ];
341342 preCheck = ''
···1+{ stdenv
2+, lib
3+, fetchFromGitHub
4+, fetchpatch
5+, python3
6+, nixosTests
78# Look up dependencies of specified components in component-packages.nix
9, extraComponents ? [ ]
···89 };
9091 # leave this in, so users don't have to constantly update their downstream patch handling
92+ patches = [
93+ (fetchpatch {
94+ # Fix I-frame interval in stream test video
95+ # https://github.com/home-assistant/core/pull/47638
96+ url = "https://github.com/home-assistant/core/commit/d9bf63103fde44ddd38fb6b9a510d82609802b36.patch";
97+ sha256 = "1y34cmw9zqb2lxyzm0q7vxlm05wwz76mhysgnh1jn39484fn9f9m";
98+ })
99+ ];
100101 postPatch = ''
102 substituteInPlace setup.py \
···343 # generic/test_camera.py: AssertionError: 500 == 200
344 "test_fetching_without_verify_ssl"
345 "test_fetching_url_with_verify_ssl"
000000346 ];
347348 preCheck = ''
···260 goimports = gotools; # added 2018-09-16
261 gometalinter = throw "gometalinter was abandoned by upstream. Consider switching to golangci-lint instead"; # added 2020-04-23
262 google-gflags = gflags; # added 2019-07-25
000263 googleAuthenticator = google-authenticator; # added 2016-10-16
264 grantlee5 = libsForQt5.grantlee; # added 2015-12-19
265 gsettings_desktop_schemas = gsettings-desktop-schemas; # added 2018-02-25
···384 mcgrid = throw "mcgrid has been removed from nixpkgs, as it's not compatible with rivet 3"; # added 2020-05-23
385 mcomix = throw "mcomix has been removed from nixpkgs, as it's unmaintained; try mcomix3 a Python 3 fork"; # added 2019-12-10, modified 2020-11-25
386 mirage = throw "mirage has been femoved from nixpkgs, as it's unmaintained"; # added 2019-12-10
0387 mopidy-local-images = throw "mopidy-local-images has been removed as it's unmaintained. It's functionality has been merged into the mopidy-local extension."; # added 2020-10-18
388 mopidy-local-sqlite = throw "mopidy-local-sqlite has been removed as it's unmaintained. It's functionality has been merged into the mopidy-local extension."; # added 2020-10-18
389 mysql-client = hiPrio mariadb.client;
···731 trilium = throw "trilium has been removed. Please use trilium-desktop instead."; # added 2020-04-29
732 truecrypt = veracrypt; # added 2018-10-24
733 tshark = wireshark-cli; # added 2018-04-25
0734 uberwriter = apostrophe; # added 2020-04-23
735 ubootBeagleboneBlack = ubootAmx335xEVM; # added 2020-01-21
736 ucsFonts = ucs-fonts; # added 2016-07-15
···260 goimports = gotools; # added 2018-09-16
261 gometalinter = throw "gometalinter was abandoned by upstream. Consider switching to golangci-lint instead"; # added 2020-04-23
262 google-gflags = gflags; # added 2019-07-25
263+ google-music-scripts = throw "google-music-scripts has been removed because Google Play Music was discontinued"; # added 2021-03-07
264+ google-musicmanager = throw "google-musicmanager has been removed because Google Play Music was discontinued"; # added 2021-03-07
265+ google-play-music-desktop-player = throw "google-play-music-desktop-player has been removed because Google Play Music was discontinued"; # added 2021-03-07
266 googleAuthenticator = google-authenticator; # added 2016-10-16
267 grantlee5 = libsForQt5.grantlee; # added 2015-12-19
268 gsettings_desktop_schemas = gsettings-desktop-schemas; # added 2018-02-25
···387 mcgrid = throw "mcgrid has been removed from nixpkgs, as it's not compatible with rivet 3"; # added 2020-05-23
388 mcomix = throw "mcomix has been removed from nixpkgs, as it's unmaintained; try mcomix3 a Python 3 fork"; # added 2019-12-10, modified 2020-11-25
389 mirage = throw "mirage has been femoved from nixpkgs, as it's unmaintained"; # added 2019-12-10
390+ mopidy-gmusic = throw "mopidy-gmusic has been removed because Google Play Music was discontinued"; # added 2021-03-07
391 mopidy-local-images = throw "mopidy-local-images has been removed as it's unmaintained. It's functionality has been merged into the mopidy-local extension."; # added 2020-10-18
392 mopidy-local-sqlite = throw "mopidy-local-sqlite has been removed as it's unmaintained. It's functionality has been merged into the mopidy-local extension."; # added 2020-10-18
393 mysql-client = hiPrio mariadb.client;
···735 trilium = throw "trilium has been removed. Please use trilium-desktop instead."; # added 2020-04-29
736 truecrypt = veracrypt; # added 2018-10-24
737 tshark = wireshark-cli; # added 2018-04-25
738+ tuijam = throw "tuijam has been removed because Google Play Music was discontinued"; # added 2021-03-07
739 uberwriter = apostrophe; # added 2020-04-23
740 ubootBeagleboneBlack = ubootAmx335xEVM; # added 2020-01-21
741 ucsFonts = ucs-fonts; # added 2016-07-15