Commit graph

159 commits

Author SHA1 Message Date
Artturin 7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
Artturin 6910a4eea0 treewide: makeWrapper to nativeBuildInputs
this should be all of them other than the failed splices
found with nixpkgs-lint
2022-09-26 17:53:26 +03:00
Nick Cao 81b615ea51
nixos/nvidia: replace IFD based assertion on power management support with version constraint 2022-09-03 19:38:23 +08:00
pennae ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
Max Schorradt 2461a62334 nvidia: remove deleted useGlamor option 2022-08-24 21:34:42 +02:00
Christian Kögler b055aadc3d
Merge pull request #157997 from kirelagin/grayscale-antialiasing
hidpi: Use gray-scale antialiasing for fonts
2022-08-19 10:37:30 +02:00
pennae 61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae 9c8531c8a5 nixos/*: replace <replaceable>s with «thing»
we can't embed syntactic annotations of this kind in markdown code
blocks without yet another extension. replaceable is rare enough to make
this not much worth it, so we'll go with «thing» instead. the module
system already uses this format for its placeholder names in attrsOf
paths.
2022-08-03 21:08:58 +02:00
pennae 2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Timothy DeHerrera 371db36e56
nvidia: improve robustness of udev rules
fixes #165719
2022-07-15 19:37:13 -07:00
yuu ce2e4707b7
hardware/nvidia: add @ to constraint on busIDType
On some configurations, the only known syntax that works
requires the `@` character, such as `intelBusId = "0@0:2:0";`  and
`nvidiaBusId = "1@1:0:0";` [1].

[1]. https://discourse.nixos.org/t/struggling-with-nvidia-prime/13794/4
2022-07-10 02:48:40 -03:00
Nick Cao e84828b973
nixos/nvidia: add option hardware.nvidia.open for selecting the opensource kernel driver 2022-06-03 10:50:33 +08:00
Nick Cao 94f5bd2051
nvidia_x11: init opensource kernel driver 2022-06-03 10:50:33 +08:00
Thiago Kenji Okada 679197e9ff
Merge pull request #174058 from jian-lin/fix-nvidia.powerManagement.finegrained-only-apply-workarounds-when-needed
nixos/nvidia: only apply workarounds for finegrained when needed
2022-06-02 17:55:23 +01:00
Thiago Kenji Okada 64870a0c57
Merge pull request #174259 from schuelermine/add-nixos-option/hardware.nvidia.forceFullCompositionPipeline
nixos/nvidia: add hardware.nvidia.forceFullCompositionPipeline
2022-06-02 17:50:50 +01:00
Anselm Schüler 446d2cb021 nixos/nvidia: add hardware.nvidia.forceFullCompositionPipeline 2022-05-24 11:46:50 +02:00
linj d5a9c1dd08 nixos/nvidia: remove a useless option
According to the doc[1], NVreg_DynamicPowerManagement is a kernel
module parameter, which it is already set as. So it should not be set
as an xorg option.

[1]: https://download.nvidia.com/XFree86/Linux-x86_64/515.43.04/README/dynamicpowermanagement.html#DriverSettingsfe624
2022-05-23 05:11:26 +08:00
linj 97a855ca0e nixos/nvidia: only apply workarounds for finegrained when needed
Accoriding to the doc[1], these workarounds is no needed for kernel
5.5 and newer.

[1]: https://download.nvidia.com/XFree86/Linux-x86_64/515.43.04/README/dynamicpowermanagement.html#KnownIssuesAndW6426e
2022-05-23 05:01:40 +08:00
Rick van Schijndel 536528ede8
Merge pull request #170695 from matshch/fix/nvidia-device-minor
nixos/nvidia: fix /dev/nvidia* devices minors
2022-04-30 15:34:16 +02:00
Graham Christensen f00109472a
Merge pull request #164185 from alexshpilkin/calibration
facetimehd: support sensor calibration files
2022-04-29 15:53:30 -04:00
Artem Leshchev 4d7bc6ccc0 nixos/nvidia: fix /dev/nvidia-uvm-tools device minor 2022-04-28 13:55:53 +03:00
Artem Leshchev 73261bdc59 nixos/nvidia: make nvidia-frontend device major constant
It is assigned by https://www.kernel.org/doc/Documentation/admin-guide/devices.txt
and never changes, so we can skip grep.
2022-04-28 13:55:53 +03:00
Artem Leshchev b01be47c87 nixos/nvidia: fix /dev/nvidia* devices minors
We can't assume that DRI card minor is the same as NVidia GPU device minor,
because some DRI minors could be taken by GPUs of other vendors.

Fixes #87788, #98942.
2022-04-28 01:18:58 +03:00
Janne Heß 4f3a868e59
Merge pull request #169049 from helsinki-systems/feat/systemd-stage-1-amdgpu-pro
nixos/amdgpu-pro: Add support for systemd stage 1
2022-04-20 11:36:53 +02:00
Janne Heß 0a60a12fae
nixos/amdgpu-pro: Add support for systemd stage 1 2022-04-17 14:00:02 +01:00
Guillaume Girol 5f95bff481 nixos/nvidia: fix type of bus ID option to accept empty string 2022-04-17 12:00:00 +00:00
polykernel 614b54d9b0 hardware/nvidia: stricter constraints on PCI bus-id.
The current type for the busId options are too relaxed, a stricter
constraint should be imposed to guard against typos which result
in Xorg unable to start.

This commit restricts the type to adhere to the B/D/F notation[1] for
addressing devices as expected by the module option.

[1] - https://wiki.osdev.org/PCI#Configuration_Space_Access_Mechanism_.231
2022-04-16 15:25:37 -04:00
Alyssa Ross ae8e8aaee7 treewide: remove obsolete kernel version checks
We no longer support any Linux kernel older than 4.9.
2022-04-08 09:56:09 +00:00
Googlebot 4007aa201b Merge remote-tracking branch 'upstream/master' 2022-03-21 11:32:36 -04:00
Jonathan Ringer 0326d67a58 nixos/nvidia: add vaapi support 2022-03-14 22:35:11 -07:00
Alexander Shpilkin 0d233ebed0
nixos/facetimehd: add option hardware.facetimehd.withCalibration
The new option (disabled by default) pulls in the experimental sensor
calibration files for the Facetime HD camera. These will also be pulled
in by hardware.enableAllFirmware.
2022-03-15 03:42:49 +03:00
Googlebot b2068c1248
Merge branch 'NixOS:master' into master 2022-03-09 09:58:39 -05:00
Alyssa Ross 1176525f87 treewide: remove obsolete kernel version checks
We don't support Linux kernels older than 4.4 in Nixpkgs.
2022-02-19 21:09:19 +00:00
googlebot 125a347ae1 nvidia: Fix AMD APU for Prime Sync 2022-02-04 17:35:41 -05:00
Kirill Elagin ad735b87e4 hidpi: Use gray-scale antialiasing for fonts
For displays with high pixel density, there is no need to do subpixel
anti-aliasing (which is the default) – grayscale antialiasing is enough.

In terms of fontconfig, we keep antialiasing on, but tell it not to play
any RGB tricks.
2022-02-03 10:20:50 -05:00
Jan Tojnar e00317be13 nixos/nvidia: remove obsolete GDM on Wayland assertion
GDM enables Wayland on supported platforms automatically (see ${gnome.gdm}/lib/udev/rules.d/61-gdm.rules), so we removed the `gdm.nvidiaWayland` option.

You will still need `hardware.nvidia.modesetting.enable = true;` with `nvidia` driver, though.
2022-02-01 19:22:04 +01:00
Allen Short 9e47e60971 amdgpu-pro: 17.40 -> 21.30 2021-12-21 11:17:34 -04:00
Jan Tojnar dad4fddd52 nixos/nvidia: check modesetting for gdm-wayland only when gdm is enabled
Reported in https://github.com/NixOS/nixpkgs/pull/147153#issuecomment-982695772
2021-11-30 16:06:21 +01:00
Artturi 04a499cdde
Revert "nixos/hidpi: add xserver dpi" 2021-11-29 23:26:46 +02:00
Bernardo Meurer cf0e83f5c4
Merge pull request #137157 from rebeccaskinner/fix/nvidia-settings
nixos/modules/hardware/video/nvidia: Fix incorrect reference to 'nvid…
2021-11-16 10:18:16 -08:00
Cole Mickens 216dd5b740
nvidia: fix egl-wayland loading 2021-10-20 15:19:06 -07:00
Timothy DeHerrera 305ea3e9ed
nixos/nvidia: fix typo in PM assert 2021-10-13 09:39:35 -06:00
Naïm Favier 2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
rebecca skinner e7996ab6ce nixos/modules/hardware/video/nvidia: Fix incorrect reference to 'nvidiaSettings'
This patch fixes a bug caused by an incorrect reference to
'nvidiaSettings' rather than 'cfg.nvidiaSettings'. The bug caused
the system to not build when using the nvidia drivers.

Tested on my local machine.
2021-09-08 23:33:07 -05:00
Phillip Cloud 6aaccdcbc8
nixos/nvidia: remove extra space 2021-09-01 08:57:33 -04:00
Phillip Cloud db0560c0f2
nixos/nvidia: fix missing variable reference 2021-09-01 08:54:32 -04:00
Bernardo Meurer 7b2709f6a4
nixos/nvidia: let user choose whether to install nvidia-settings 2021-08-30 17:06:07 -07:00
Artturi bb03a951c9
Merge pull request #116290 from aaronjanse/mar2021-hidpi
nixos/hidpi: add xserver dpi
2021-08-13 01:50:36 +03:00
Edmund Wu 573aae39e2
nixos/modules: assertion for required PM files 2021-08-07 01:41:58 -04:00
Natan Lao 4d8569b173 nixos/nvidia: fix hardware.nvidia.package example 2021-06-08 19:40:27 -07:00