Commit Graph

171 Commits

Author SHA1 Message Date
Janik H.
8612ed1ee9
nixos/networkmanager: change config generation to use the ini generator 2024-04-17 21:20:11 +02:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Alessandro Labate
43521f9021
nixos/networkmanager: correct example (#295439)
The example pertinent to `fccUnlockScripts` contains wrong (maybe old) key names possibly leading to trial/error while configuring the option. This issue can be avoided updating the example.
2024-03-29 14:42:14 +01:00
github-actions[bot]
60fbf92c10
Merge master into staging-next 2024-03-16 18:01:00 +00:00
Janik H.
847a53742c
nixos/networkmanager: ensure-profiles, make sure networkmanager is running 2024-03-16 18:11:58 +01:00
github-actions[bot]
cecf050e96
Merge master into staging-next 2024-03-13 12:01:25 +00:00
Pol Dellaiera
c35c016e5d
Merge pull request #295529 from Janik-Haag/networkmanager-drop-unbound
nixos/networkmanager: drop unbound form dns servers
2024-03-13 09:04:58 +01:00
Janik H.
a97e56ae28
nixos/networkmanager: drop unbound form dns servers
upstream dropped unbound in 5da17c689b
2024-03-13 08:31:52 +01:00
github-actions[bot]
06e5eb63d3
Merge staging-next into staging 2024-03-11 18:01:53 +00:00
Pierre Allix
cf625fe5f0 nixos/networkmanager: add doc about nm profiles interaction with resolvconf 2024-03-11 12:55:27 +01:00
Maxine Aubrey
e1863b4f79
nixos/networkmanager: support stable-ssid for cloned MAC addresses 2024-02-22 18:37:13 +01:00
Martin Ertsås
3e3fea8653
nixos/modemmanager: Add qmicli and mbimcli when using fccUnlockScripts
The ModemManager shipped fccUnlockScripts are using either qmicli or
mbimcli, to unlock wwan modems. These needs to be available for
ModemManager if you set the fccUnlockScripts link, so instead of having
every user than needs it pull it inn in different ways, we should just
provide the tools if we think they might be needed.

https://modemmanager.org/docs/modemmanager/fcc-unlock
2024-01-12 11:53:44 +01:00
Janik H
a316aa58d9
nixos/networkmanager: add declarative profiles 2023-10-21 00:20:36 +02:00
Sandro Jäckel
9a85d77152
nixos/networkmanager: default firewallBackend to nftables, remove firewallBackend
Co-authored-by: Florian Klink <flokli@flokli.de>

Co-authored-by: Lin Jian <me@linj.tech>
2023-09-21 16:18:57 +02:00
Sandro Jäckel
ad0ca163e1
nixos/networkmanager: cleanup, fix example rendering 2023-09-21 15:16:54 +02:00
Florian Klink
5d3ca06db3 nixos/modemmanager: remove enableBundledFccUnlockScripts option
This removes the networking.networkmanager.enableBundledFccUnlockScripts
option, and updates the release notes.
2023-09-12 22:57:31 +02:00
Florian Klink
8606f6c8e1 nixos/modemmanager: support additional FCC unlock scripts
This commit introduces a `networking.networkmanager.fccUnlockScripts`
option, which allows specifying additional, usually vendor-provided
unlock scripts.

networking.networkmanager.enableBundledFccUnlockScripts is refactored to
make use of the same mechanism internally.
2023-09-12 16:55:15 +02:00
Florian Klink
0bfc763df2 nixos/modemmanager: enableFccUnlock -> enableBundledFccUnlockScripts
PR #155414 introduced an option to support enabling the FCC unlock
scripts that ModemManager provides, but since 1.18.4 doesn't execute
anymore.

However, this option is specifically only about the unlock scripts
provided with ModemManager so far. Rename the option to make this more
obvious.
2023-09-12 16:55:15 +02:00
Florian Klink
5626174a09 nixos/networkmanager: nixpkgs-fmt 2023-09-12 16:55:15 +02:00
Florian Klink
02a5e9c933 nixos/networkmanager: create pppd lock directory
I digged up some 3G stick, which uses ppp to set up the connection.

It failed to spin up ppp, because ppp failed to find the directory it wants to create its lockfiles in:

```
Jul 22 16:47:49 tp ModemManager[926779]: <info>  [modem1] state changed (connected -> disconnecting)
Jul 22 16:47:49 tp ModemManager[926779]: <info>  [modem1] simple connect started...
Jul 22 16:47:49 tp ModemManager[926779]: <info>  [modem1] simple connect state (4/10): wait to get fully enabled
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] state changed (disconnecting -> registered)
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] simple connect state (5/10): wait after enabled
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1/bearer0] connection #11 finished: duration 1s
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] simple connect state (6/10): register
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] simple connect state (7/10): wait to get packet service state attached
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] simple connect state (8/10): bearer
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] simple connect state (9/10): connect
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] state changed (registered -> connecting)
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] state changed (connecting -> connected)
Jul 22 16:47:50 tp ModemManager[926779]: <info>  [modem1] simple connect state (10/10): all done
Jul 22 16:47:50 tp pppd[1576260]: Plugin /nix/store/yqdqzz6y6agcmrfj8b6pwqhjcjyb3ypr-networkmanager-1.42.6/lib/pppd/2.5.0/nm-pppd-plugin.so loaded.
Jul 22 16:47:50 tp NetworkManager[1576260]: Plugin /nix/store/yqdqzz6y6agcmrfj8b6pwqhjcjyb3ypr-networkmanager-1.42.6/lib/pppd/2.5.0/nm-pppd-plugin.so loaded.
Jul 22 16:47:50 tp pppd[1576260]: nm-ppp-plugin: initializing
Jul 22 16:47:50 tp pppd[1576260]: pppd 2.5.0 started by root, uid 0
Jul 22 16:47:50 tp pppd[1576260]: Can't create lock file /var/run/pppd/lock/LCK..ttyUSB0: No such file or directory
Jul 22 16:47:50 tp NetworkManager[1576260]: Can't create lock file /var/run/pppd/lock/LCK..ttyUSB0: No such file or directory
Jul 22 16:47:50 tp pppd[1576260]: nm-ppp-plugin: status 2 / phase 'serial connection'
Jul 22 16:47:50 tp pppd[1576260]: Exit.
Jul 22 16:47:50 tp pppd[1576260]: nm-ppp-plugin: status 0 / phase 'dead'
Jul 22 16:47:50 tp pppd[1576260]: nm-ppp-plugin: cleaning up
```

Creating the directories via tmpfiles.d got the connection to succeed,
and might also fix other connections using PPP.
2023-07-22 17:00:17 +03:00
Daniel Nagy
b4674b39c1
treewide: use mkEnableOption in nixos modules 2022-11-10 09:30:00 +01:00
pennae
1d41cff3dc nixos/*: convert straggler options to MD 2022-08-31 17:27:38 +02:00
pennae
e4f876eb7e nixos/*: convert varlist-using options to MD
there are sufficiently few variable list around, and they are
sufficiently simple, that it doesn't seem helpful to add another
markdown extension for them. rendering differences are small, except in
the tor module: admonitions inside other blocks cannot be made to work
well with mistune (and likely most other markdown processors), so those
had to be shuffled a bit. we also lose paragraph breaks in the list
items due to how we have to render from markdown to docbook, but once we
remove docbook from the pipeline those paragraph breaks will be restored.
2022-08-31 16:32:53 +02:00
pennae
087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae
423545fe48 nixos/*: normalize manpage references to single-line form
now nix-doc-munge will not introduce whitespace changes when it replaces
manpage references with the MD equivalent.

no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-05 18:34:50 +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
694d5b19d3 nixos/*: replace </para><para> with double linebreaks
our xslt already replaces double line breaks with a paragraph close and
reopen. not using explicit para tags lets nix-doc-munge convert more
descriptions losslessly.

only whitespace changes to generated documents, except for two
strongswan options gaining paragraph two breaks they arguably should've
had anyway.
2022-08-03 20:39:21 +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
Lassulus
df7337ebb4
Merge pull request #166456 from mweinelt/isc-dhcp
dhcp: 4.4.2-P1 -> 4.4.3 and make client & relay support optional
2022-04-10 11:05:29 +01:00
Martin Weinelt
a31f123c1c
networkmanager: remove dhcp and pass dhcpcd instead
The ISC DHCP client has reached its end of life.
2022-03-30 21:05:10 +02:00
Jan Tojnar
d2efc3ef70 nixos/networkmanager: Allow overriding installed plug-ins
Now, one can just use `networking.networkmanager.plugins = lib.mkForce [];`
if they want to get rid of the plug-ins.

Co-authored-by: lassulus <lassulus@lassul.us>
2022-03-17 04:50:53 +01:00
piegames
cd7e516b26
Merge pull request #156858: nixos/polkit: don't enable by default 2022-03-05 14:48:35 +01:00
Martin Weinelt
5601e028cf
nixos/networkmanager: enable polkit
Allows user in the networkmanager group to control the daemon.
2022-01-27 01:45:45 +01:00
Jarosław Wygoda
8e49e6168a modemmanager: 1.18.2 -> 1.18.4
Since release 1.18.4, the ModemManager daemon no longer automatically
performs the FCC unlock procedure by default. The user must, under their
own responsibility, enable the automatic FCC unlock as shipped by
ModemManager.
2022-01-19 23:06:11 +01:00
Artturin
31759dc4b7 nixos/networkmanager: remove redundant ipv6.ip6-privacy
this setting was added in 2016 in commit
bcdd81d9e1

the posibility to preferTempAddress was added to
nixos/network-interface in 2018 in commit
1fec496f38

preferTempAddress was renamed to tempAddress
in 2020 in commit 2485e6399e

therefore this setting is redundant since nm will use the sysctl option

nixos/network-interfaces: add default to sysctl so that the value for it
is set

networkmanager falls back to it
https://man.archlinux.org/man/NetworkManager.conf.5
2021-11-19 01:12:25 +02:00
github-actions[bot]
1dbe4c0174
Merge staging-next into staging 2021-10-05 00:02:08 +00:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
maxine [they]
d1a18a3dbe
Merge pull request #137233 from maxeaubrey/modemmanager_1.18.0 2021-10-03 16:48:07 +02:00
Maxine Aubrey
e05c1e3431
nixos/networkmanager: drop modemmanager overrides
as of 1.18.0, modemmanager defaults to strict when no other options are
passed, so we can just use the upstream unit as is
2021-09-27 02:33:55 +02:00
Guillaume Girol
bc3bca822a nixos: define the primary group of users where needed 2021-09-12 14:59:30 +02:00
github-actions[bot]
db6a26db02
Merge master into staging-next 2021-07-27 18:01:01 +00:00
Guillaume Girol
407ef1dc6f
Merge pull request #121530 from symphorien/wifireg
nixos: add option to load wireless regulatory database as firmware
2021-07-27 16:43:57 +00:00
Maxine Aubrey
aa7608d7de
nixos/networkmanager: add firewallBackend option 2021-07-21 00:16:34 +02:00
Kevin Cox
af51d70857
nixos/networkmanager: Add connectionConfig. (#118308)
Adds the `networking.networkmanager.connectionConfig` option which allows setting arbitrary settings inside the `[connection]` section.

This also reworked the underlying representation significantly to be less string-pasting and more semantic. In a future step it probably makes sense to provide raw access to other sections to users rather than replying on `extraConfig`. However I decided to defer this primarily because ordering of sections can matter. (Although IIUC this is only true for different `[connection]` sections). I think in the future we could expose an object where users can define/edit all sections and map the current configuration onto those. For now however only `[connection]` is exposed and the rest are just used internally.
2021-06-08 11:13:59 -04:00
Guillaume Girol
8fe0143d88 nixos: add option to load wireless regulatory database as firmware
use it when networkmanager or wpa_supplicant is enabled.

fixes #57053
fixes "Direct firmware load for regulatory.db failed with error -2"
in dmesg

Note that all kernels on unstable are newer that 4.15, which is required
for this to work.
2021-05-23 19:49:05 +02:00
Sandro
000af0d8bf
Merge pull request #118658 from rhoriguchi/networkmanager
nixos/networkmanager: add missing kernel module for wpa authentication
2021-04-12 20:18:32 +02:00
Ryan Horiguchi
5171c5c2ee
nixos/networkmanager: add missing kernel module for wpa authenticaion 2021-04-06 13:50:51 +02:00
Sandro Jäckel
9378fdf87e
iproute: deprecate alias 2021-04-04 01:43:46 +02:00
Graham Christensen
bc49a0815a
utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
Florian Klink
72cd3086cc networkmanager-sstp: init at unstable-2020-04-20 2020-10-21 00:02:18 +02:00