Commit Graph

609 Commits

Author SHA1 Message Date
Florian Klink
fe446f8bb4 nixos/udev: allow /bin/sh in udev rules
Using `/bin/sh` in udev rules is fine (as it's guaranteed to point to a
(bash) shell on NixOS), and actually is better than hardcoding absolute
paths, at least in cases where these rules are also added to the
(systemd-based) initrd (via boot.initrd.services.udev.rules).

To allow this, we need to update the check routine that assembles the
list of files needing fixup, to explicitly exclude `/bin/sh` occurences.

To do this, we convert the pattern to a PCRE regex (which requires "/"
to be escaped), and add `(?!/bin/sh\b)` as a negative lookahead.

This subsequently allows udev rules to (start using) `/bin/sh` again, so
they'll work in-initrd.
2023-12-14 19:14:13 +02:00
Florian Klink
cb0fb74a2b nixos/udev: update description for services.udev.path
services.udev.path already contains some defaults, these are however
defined in the module implementation, not options.

Update the description to make this more clear.
2023-12-14 18:09:54 +02:00
Niklas Hambüchen
d65c4445a9 Add hardware.sane.backends-package option.
Allows overriding `sane-backends` drivers without rebuilding many packages.
2023-12-10 07:42:17 +01:00
Nick Cao
e9f0a62ef5
nixos/power-profiles-daemon: add package option 2023-12-05 13:21:32 -05:00
Nick Cao
0588b4bda0
nixos/power-profiles-daemon: drop with lib 2023-12-05 13:21:30 -05:00
Pol Dellaiera
9284581a09
Merge pull request #271376 from kallistoteles/thinkfan-service-restart
nixos/thinkfan: restart on failure
2023-12-03 12:47:01 +01:00
kalle
f1e6c6641e nixos/thinkfan: add setting
the thinkfan service failed from time to time on my t440s, so I added
restart on fail to the systemd service.
2023-12-03 08:45:03 +01:00
Peder Bergebakken Sundt
23fb8f614b
Merge pull request #261378 from lamarios/auto-epp
auto-epp: init at 1.2.1
2023-11-30 19:47:12 +01:00
Paul Fauchon
b034425636 nixos/auto-epp: init 2023-11-29 14:28:25 +08:00
Bram Duvigneau
c2d1cd852f nixos/brltty: Set isSystemUser for the brltty user 2023-11-28 22:46:03 +01:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
ners
ed31e0235e treewide: replace broken udev paths with systemd 2023-11-21 15:09:38 +01:00
Silvan Mosberger
3e5bc28ec5
Merge pull request #266598 from infinisil/fix-fwupd
nixos/fwupd: Fix fwupd-refresh service
2023-11-14 08:56:25 +01:00
Anthony Roussel
e30f48be94
treewide: fix redirected and broken URLs
Using the script in maintainers/scripts/update-redirected-urls.sh
2023-11-11 10:49:01 +01:00
Silvan Mosberger
4587db7279 nixos/fwupd: Don't ignore stderr 2023-11-10 06:54:45 +01:00
Silvan Mosberger
6bf31e521e nixos/fwupd: Don't use DynamicUser
Was introduced in dde6a4f397532bbd01b346466ea751e7c3cd9d06
but it doesn't work on my machine:

    fwupdmgr[439074]: Failed to connect to daemon: The connection is closed

Creating a persistent user does work however
2023-11-10 06:51:56 +01:00
Maximilian Bosch
845cf9943c
Merge pull request #264582 from FliegendeWurst/throttled-modprobe
nixos/throttled: load required kernel module
2023-11-04 12:27:38 +01:00
Peter Hoeg
f4856b55dd nixos/fwupd: make auto-refresh run (and work) 2023-11-03 10:54:41 +01:00
FliegendeWurst
1391725fb5 nixos/throttled: load required kernel module 2023-10-31 22:14:02 +01:00
Will Fancher
cca22054c0 systemd-stage-1: Add assertions for unsupported options. 2023-10-30 12:15:58 +01:00
Robert Schütz
80f59b1626
Merge pull request #261135 from dotlambda/nixos-iptsd-init
nixos/iptsd: init
2023-10-22 09:48:37 -07:00
Lorenz Leutgeb
62c63f746a nixos/undervolt: Use hardware.cpu.x86.msr 2023-10-22 09:41:00 +02:00
Lorenz Leutgeb
b70a63a910 nixos/tlp: Use hardware.cpu.x86.msr 2023-10-22 09:41:00 +02:00
Lorenz Leutgeb
b893b67028 nixos/throttled: Use hardware.cpu.x86.msr 2023-10-22 09:40:59 +02:00
Bjørn Forsman
142074c2a8 nixos: fix bad mkEnableOption descriptions
Fix descriptions that don't account for (1) the "Whether to enable"
prefix or (2) the automatically added trailing dot.
2023-10-20 16:22:40 +01:00
Robert Schütz
04b6bd2def nixos/iptsd: init 2023-10-14 18:52:38 -07:00
woojiq
fee1832e84 nixos/keyd: add extraConfig option 2023-10-07 11:50:04 +03:00
Artturi
31c647207a
Merge pull request #231384 from mrcjkb/tuxedo-rs 2023-09-27 08:08:50 +03:00
Eike Frost
be2b474c00 nixos/tlp fix NetworkManager RDW dispatcher script location 2023-09-26 21:35:54 -04:00
Marc Jakobi
01cc0a605a nixos/tuxedo-rs: init at 0.2.2 2023-09-26 23:28:05 +02:00
Lin Jian
c5ba4c687e
nixos/kanata: add default value, doc and warning for devices 2023-09-24 17:09:23 +08:00
nicoo
9d27026328 nixos/auto-cpufreq: Add nicoo to maintainers 2023-09-13 10:25:53 +00:00
Weijia Wang
eb1c345512
Merge pull request #253048 from Mic92/openrbg
nixos/openrbg: set cpu model based on what microcode updates are enabled
2023-09-07 22:55:34 +02:00
May
7f2ec624dd
auto-cpufreq: 1.7.1 -> 1.9.9 (#253595)
* auto-cpufreq: 1.7.1 -> 1.9.9

* fix test

* set `meta.buildDocsInSandbox = false`

required because description depends on restricted module argument pkgs
2023-09-06 23:41:24 +02:00
Jörg Thalheim
f6fa02c984 openrbg: set default based on what microcode updates are enabled
nixos-generate-config sets either of these, so lets use them
2023-09-03 07:16:52 +02:00
Adrian Pistol
7c9a7925b9 thermald: allow ignoring cpuid check 2023-08-27 16:18:54 +02:00
Benjamin Staffin
63f858bdf8
hddfancontrol: license and metadata tweaks (#251184)
* nixos/hddfancontrol: missed a few code review tweaks

Following up on https://github.com/NixOS/nixpkgs/pull/239801#pullrequestreview-1498132501

* hddfancontrol: Fix license field
2023-08-24 12:41:43 -04:00
Benjamin Staffin
12b3178bd2 nixos/hddfancontrol: initial module & test 2023-08-23 13:25:29 -04:00
Lin Jian
74fadae942
treewide: stop using types.string
It is an error[1] now.

[1]: https://github.com/NixOS/nixpkgs/pull/247848
2023-08-08 21:31:21 +08:00
davidak
62f11e9e1d
Merge pull request #246187 from SuperSamus/hid-nintendo-remove
hid-nintendo: remove
2023-08-06 04:07:11 +02:00
Martino Fontana
d9fd4ba733 hid-nintendo: remove 2023-07-30 14:49:27 +02:00
Daniel Schaefer
6591d332f9 nixos/keyd: Allow service to call nice syscall
Otherwise it'll be killed by systemd with
Main process exited, code=killed, status=31/SYS

Signed-off-by: Daniel Schaefer <git@danielschaefer.me>
2023-07-26 17:19:49 +08:00
Stzx
e196c81a23
udisks2: fix conf file loading warnings 2023-07-24 11:41:50 +08:00
woojiq
2d3bf20086 nixos/keyd: add support for multi-file configuration
Add `keyboards` option to define different configurations for different IDs. This creates the appropriate files in `/etc/keyd` instead of just `default.conf` as before.
Add `23.11` release note entry.
Add `mkRemovedOptionModule` for the old API with a note on how to revert the old behavior.
2023-07-15 11:33:41 +03:00
Will Fancher
73a8ca1674
Merge pull request #240601 from lilyinstarlight/fix/lvm-root-sd-stage-1-unhide
nixos/*: unhide remaining systemd stage-1 options
2023-07-03 13:38:12 -04:00
Lily Foster
e9207b0501
nixos/*: unhide remaining systemd stage-1 options
These options were missed in NixOS/nixpkgs#226237, but they all were
specifically added for systemd stage-1.
2023-07-03 08:41:38 -04:00
Domen Kožar
8079c9ac60 nixos: append ccid as a plugin 2023-06-30 16:21:57 +01:00
Michele Guerini Rocco
3bb07bdf2d
Merge pull request #236322 from rnhmjoj/pr-udev-quiet
nixos/udev: silence harmless warnings
2023-06-27 10:28:41 +02:00
Felix Buehler
6672dde558 treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
K900
66cb54c7fc nixos/supergfxd: add pciutils to path
Used for some weird code paths. Fixes #239059.
2023-06-22 08:27:44 +03:00
r-vdp
52214d7f38
fwupd: 1.8.15 -> 1.9.1
Release notes: https://github.com/fwupd/fwupd/releases/tag/1.9.1
2023-06-15 09:33:12 +02:00
rnhmjoj
dbcd187add
nixos/udev: silence harmless warnings
`udevRulesFor` generates a lot of warnings like:

  substituteStream(): WARNING: pattern '"/sbin/modprobe' doesn't match anything in file '/nix/store/.../95-dm-notify.rules'

due to the (preemptive) substitution of common paths in the default
udev rules. In this case a file having no matches is not unepected
and poses no issue at all.
2023-06-06 19:42:18 +02:00
Lily Foster
3e014434a7
Merge pull request #230876 from purin-aurelia/nixos-openrgb-fix
nixos/openrgb: fix data dir & amd i2c
2023-05-18 15:00:13 -04:00
woojiq
2ee66a3000 keyd: run systemd service as root user 2023-05-15 15:28:34 +02:00
purin
9595113480 nixos/openrgb: fix data dir & amd i2c 2023-05-10 01:34:21 +12:00
Artturi
2d256ca7c2
Merge pull request #227499 from tollb/w20230421d_use_systemd_hwdb_to_build_udev_hwdb 2023-05-02 19:04:06 +03:00
Alexandre Acebedo
576d7d34c4 asusctl: 4.5.8 -> 4.6.2 2023-05-01 11:07:39 +02:00
Michael Livshin
ed01157da8 auto-cpufreq: actually run as deamon
The upstream service definition uses the (undocumented) --daemon
option, which causes the process to stay running and not exit
immediately.
2023-04-28 14:36:10 +03:00
Bruce Toll
0fce0749b5 nixos/udev: Fix hwdb conflict handling; build with systemdb-hwdb
Switch to systemdb-hwdb to build the udev hwdb.bin, as "udevadm hwdb" is
deprecated. This fixes an issue where the order of conflicting keys is
not respected.  The systemd-hwdb command creates a newer format (v3) of
hwdb.bin that respects the ordering of duplicate keys, with later
values replacing earlier occurrences.

A release note is included, as some mappings may be affected.
2023-04-21 19:08:37 -04:00
Will Fancher
dd392d7c76 systemd-initrd: networkd 2023-04-17 16:41:34 -04:00
nicoo
04b1a3f847 nixos/auto-cpufreq: Avoid touching /etc 2023-04-09 19:15:49 +00:00
nicoo
deab2b3bf7 nixos/auto-cpufreq: Add configuration support. 2023-03-28 22:01:27 +00:00
Lin Jian
4482c70530 nixos/kanata: notify systemd when starting up is finished
- set service type to notify
- allow unix socket which is needed by systemd notify
2023-03-25 20:56:48 +01:00
woojiq
296e7f92cd keyd: add keyd service and test
The keyd package already exists, but without a systemd service.

Keyd requires write access to /var/run to create its socket. Currently
the directory it uses can be changed with an environment variable, but
the keyd repo state suggests that this may turn into a compile-time
option. with that set, and some supplementary groups added, we can run
the service under DynamicUser.

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
2023-03-22 15:12:29 +01:00
Krzysztof Nazarewski
ed4ce16637
supergfxd: add missing kmod to PATH 2023-03-20 09:44:47 +01:00
Bernardo Meurer
6e55733359
Merge pull request #219747 from Stunkymonkey/deprecate-isNull 2023-03-16 11:10:22 -03:00
Lily Foster
6e6d31f4bc
nixos/fwupd: add settings option for uefi_capsule.conf 2023-03-10 15:25:41 -05:00
Felix Buehler
d10e69c86b treewide: deprecate isNull
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
2023-03-06 22:40:04 +01:00
Lin Jian
405919c6c9 nixos/kanata: misc improvements
- simplify some descriptions
- use getExe instead of hardcoding a binary path
- remove a unneeded "lib."
2023-02-17 22:34:38 +01:00
Lin Jian
46122183b5 nixos/kanata: remove a limit that number of devices cannot be 0
Since 1.0.8, kanata can automatically detect keyboard devices if
linux-dev is not in config.
2023-02-17 22:34:38 +01:00
Lin Jian
f34917b128 nixos/kanata: do not use path activation
Since 1.2.0, kanata handles missing keyboards well:
- only one keyboard need to be present when kanata starts;
- if linux-continue-if-no-devs-found is set to yes, all keyboards can
be missing at the beginning;
- all keyboards can be (un)pluged when kanata is running.

For simplicity, linux-continue-if-no-devs-found is set to yes and
systemd patch activation is removed.
2023-02-17 22:34:38 +01:00
bb2020
61219651fe nixos/udisks2: add mountOnMedia option 2023-02-10 16:38:05 +03:00
pennae
bf4c0c1900 nixos/*: remove trailing period in mkEnableOptions
those are added by mkEnableOption, and .. is replaced to … by markdown
processing.
2023-02-08 15:23:34 +01:00
Martin Weinelt
a85007b253
Merge pull request #213317 from kurnevsky/throttled
throttled: fix after recent update
2023-02-01 01:37:20 +00:00
github-actions[bot]
dd1ff149da
Merge master into staging-next 2023-01-31 00:02:31 +00:00
pennae
5b6dcece88
Merge pull request #212684 from pennae/nixos-render-docs
nixos-render-docs: init, use for some manual rendering to docbook
2023-01-30 19:26:07 +01:00
Evgeny Kurnevsky
8542aa185d
throttled: fix after recent update 2023-01-29 10:25:08 +03:00
pennae
0a6e6cf7e6 nixos/manual: render module chapters with nixos-render-docs
this converts meta.doc into an md pointer, not an xml pointer. since we
no longer need xml for manual chapters we can also remove support for
manual chapters from md-to-db.sh

since pandoc converts smart quotes to docbook quote elements and our
nixos-render-docs does not we lose this distinction in the rendered
output. that's probably not that bad, our stylesheet didn't make use of
this anyway (and pre-23.05 versions of the chapters didn't use quote
elements either).

also updates the nixpkgs manual to clarify that option docs support all
extensions (although it doesn't support headings at all, so heading
anchors don't work by extension).
2023-01-27 20:07:34 +01:00
Vladimír Čunát
8a77ed60ac
Merge branch 'master' into staging-next 2023-01-27 09:36:55 +01:00
Jan Tojnar
42930c79dd nixos/fwupd: Upgrade ESP path config key
This setting was renamed and moved to the main config file in fwupd 1.8.5:
5d38e0aeea

Without this patch, fwupd tries to migrate the config and crashes when it meets the immutable:

    FuEngine             migrating OverrideESPMountPoint=/boot to EspLocation
    Failed to load daemon: failed to load engine: Failed to create file ?/etc/fwupd/daemon.conf.6HZBZ1?: Read-only file system

The setting was first introduced to the module in 08547ff642 to override the store paths set during build.5d38e0aeea
2023-01-27 00:54:17 +01:00
github-actions[bot]
578f1ba854
Merge master into staging-next 2023-01-26 18:01:29 +00:00
K900
a68cd68b45 nixos/fwupd: adjust for config parameter migration 2023-01-24 18:08:09 +03:00
github-actions[bot]
727e365f02
Merge master into staging-next 2023-01-24 00:02:11 +00:00
Sandro
deeba2fb9e
Merge pull request #206257 from matklad/throttledup 2023-01-23 23:54:18 +01:00
github-actions[bot]
142d3af1cb
Merge staging-next into staging 2023-01-15 00:03:07 +00:00
Elian Doran
ba0a640afd fancontrol: restart service after suspend 2023-01-14 19:33:48 +01:00
Sergei Trofimovich
ca4da963f8 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
    pkgs/development/libraries/audio/roc-toolkit/default.nix
2023-01-14 11:07:42 +00:00
Francesco Gazzetta
c956f85fbd
Merge pull request #204653 from ymatsiuk/ymatsiuk/bluetooth
nixos/bluetooth: add input and network service configs
2023-01-12 08:24:01 +00:00
pennae
53fc887582 nixos/manual: move "edit the MD file" comments to generated XML 2023-01-10 12:34:37 +01:00
pennae
bf92eaebe4 nixos/manual: generate module chapters with md-to-db.sh 2023-01-10 10:32:00 +01:00
pennae
23ea73b416 nixos/manual: enable smart quotes for all MD chapters 2023-01-10 10:31:59 +01:00
pennae
a553f57cb6 nixos/trezord: convert manual chapter to MD 2023-01-10 10:31:55 +01:00
pennae
80a78f2e1e nixos/manual: remove links from program listings
markdown cannot represent those links. remove them all now instead of in
each chapter conversion to keep the diff for each chapter small and more
understandable.
2023-01-10 10:31:52 +01:00
Gaetan Lepage
b069f6230d nixos/fwupd: enable udisks2 2023-01-04 08:02:42 +01:00
K900
25bb55495b nixos/supergfxd: make config file read/write 2022-12-29 14:17:24 +03:00
Bjørn Forsman
700adb32e9 nixos/sane: point SANE_CONFIG_DIR away from /etc/sane.d
This brings back the ability to e.g. configure sane-airscan with
`environment.etc."sane.d/airscan.conf".text = ...`.

(AFAICT, sane-airscan loads all config files it finds, so it'll first
load the one from the nixos hardware.sane.* configuration, then the user
specified one in /etc/sane.d/airscan.conf.)

Fixes: 4fbec87a5b ("nixos/sane: point env vars to /etc for quick reload")

Fixes https://github.com/NixOS/nixpkgs/issues/207262
2022-12-25 12:34:50 +01:00
Jonas Heinrich
a9e3b1c0f2 nixos/usbmuxd: Ability to change package 2022-12-19 08:14:07 -05:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Aleksey Kladov
77ff624382 throttled: 0.9.2 -> 0.10.0 2022-12-15 14:51:05 +00:00
Ryan Lahfa
78e2fbc4ce
Merge pull request #195341 from zhaofengli/fwupd-extra-daemon-conf
nixos/fwupd: Make daemon.conf structured
2022-12-13 14:19:26 +01:00