Commit Graph

1079 Commits

Author SHA1 Message Date
Markus Kowalewski
9d71961da2 nixos/nfs-client: add dns_resolver entry to request-key.conf (#455207) 2025-11-03 11:11:45 +00:00
Markus Kowalewski
90050b9691 nixos/nfs-client: add dns_resolver entry to request-key.conf
* A dns_resolver entry is needed for a NFSv4 client to
  resolve hostnames of NFS referrals and replicas.

* Make request-key.conf customizable, by moving
  content from separate file into
  `environment.etc."request-key.conf".text`
2025-11-03 11:01:32 +01:00
Philip Taron
01898764b6 treewide: replace "yes" else "no" usages to lib.boolToYesNo (#442387) 2025-10-28 16:25:46 +00:00
Sandro
724c799de3 nixos/trackpoint: add missing settings and update descriptions (#440539) 2025-10-28 12:54:08 +00:00
Silvan Mosberger
6ad2a24ff5 various: lib usage improvements - prefer attrNames/attrValues over mapAttrsToList (#455791) 2025-10-26 23:09:14 +00:00
John Titor
471e2931e8 nixos/stage-1: fix nix parsing error
```
error: A definition for option `boot.initrd.systemd.extraBin.mount' is not of type `absolute path'. Definition values:
       - In `/nix/store/h259dzilgbvpfsnlcyims14jrcdnx8fk-source/nixos/modules/tasks/filesystems/zfs.nix':
           {
             zfs = "/nix/store/hxg3s5l92y9n9m48p872i62dn5ck33hx-zfs-user-2.4.0-rc3/sbin/mount.zfs";
           }

```
Fixes https://github.com/NixOS/nixpkgs/pull/414391#issuecomment-3448084329
2025-10-26 14:27:21 +05:30
h7x4
ddb37e12c2 nixos/networkd: lib.mapAttrsToList -> lib.attrNames 2025-10-26 15:33:33 +09:00
Masum Reza
5992eb776d nixos/stage-1: always include util-linux mount (#414391) 2025-10-25 10:56:23 +00:00
Aliaksandr
80f12557f5 treewide: replace "yes" else "no" usages to lib.boolToYesNo 2025-10-21 16:04:34 +03:00
Jasper Chan
a28041998d nixos/trackpoint: add missing settings and update descriptions
Settings and descriptions pulled from:
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-platform-trackpoint

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2025-10-20 09:35:42 -07:00
Will Fancher
e825675658 linux/common-config: Disable bcachefs 2025-10-15 22:27:08 +05:30
h7x4
2881e466f7 nixos/btrfs: Add option to limit scrub throughput (#447954) 2025-10-14 02:50:56 +00:00
Wolfgang Walther
91a8fee3aa treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.
2025-10-05 10:52:03 +02:00
Maximilian Bosch
a6b0564b7d nixos/filesystems: fix special file-systems for systemd-nspawn (#345899) 2025-10-03 19:33:31 +00:00
Mynacol
e07671cc0d nixos/btrfs: Add option to limit scrub throughput 2025-10-02 10:38:00 +00:00
Will Fancher
62a07189b4 nixos/bcachefs: fix warning 2025-09-30 13:57:31 -04:00
Will Fancher
6e331d90bd bcachefs-kernel-module: Nest within bcachefs-tools
When you set the bcachefs userspace tools with:

```nix
boot.bcachefs.package = /* custom pacakge */;
```

This now also changes the kernel package. The NixOS module now calls
on the nested `cfg.package.kernelModule` expression with
`kernelPackages.callPackage`. This will enable overriding both
userspace and kernel space from e.g. upstream git.
2025-09-30 01:16:01 -04:00
Will Fancher
89e7815828 nixos/bcachefs: Use out-of-tree module when possible. 2025-09-24 21:15:52 -04:00
Will Fancher
25d56c5a34 nixos/bcachefs: Don't duplicate assertions.
The first instance is unconditional. No need to have it twice.
2025-09-24 21:15:52 -04:00
John Titor
f93738d6a2 Partially revert "nixos/bcachefs: remove linuxPackages_latest requirement"
This reverts commit afbaa572ed.

Bcachefs upstream recommends using the latest kernel for best compatibility.
2025-09-23 13:13:37 +05:30
Maximilian Bosch
a532cb052e nixos/containers: add boot.isNspawnContainer option
There are a bunch of components such as incus or LXC that also use
`boot.isContainer`, so we'd have to differentiate between "OS container"
and "actually nspawn".

This became necessary for the file-systems part where nspawn takes care
of setting up special filesystems like `/proc`, `/dev` etc., but others
don't.

To allow for a `boot.isContainer` being less overloaded, this introduces
`boot.isNspawnContainer` that is exclusively used for nspawn-specific
things. When `true`, `boot.isContainer = true;` is implied.
2025-09-21 13:26:23 +02:00
Nikita Uvarov
4de40fc8a8 nixos/filesystems: fix special file-systems for systemd-nspawn
This is a subset of aba55d1b960b4b1817bc2a32deeba447ae51f0a3 (#67336)[1]
that I (Ma27) am using for quite a while in my systemd-nspawn setup
(without `nixos-container`) to have unprivileged containers.

Recently, Linus reminded me that this isn't part of upstream NixOS and
their setup fails like this when activating config in an nspawn
instance (no shared store):

    stderr) activating the configuration...
    stdout) setting up /etc...
    stderr) mount: /dev: permission denied.
    stderr)        dmesg(1) may have more information after failed mount system call.
    stderr) mount: /dev/pts: permission denied.
    stderr)        dmesg(1) may have more information after failed mount system call.
    stderr) mount: /dev/shm: permission denied.
    stderr)        dmesg(1) may have more information after failed mount system call.
    stderr) mount: /run: permission denied.
    stderr)        dmesg(1) may have more information after failed mount system call.
    stdout) Activation script snippet 'specialfs' failed (32)

So I decided to submit this portion again.

[1] Hence I retained the original authorship.

Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>
2025-09-21 13:26:23 +02:00
Chet Gurevitch
148d76c0b9 nixos/stage-1: always include util-linux mount
- respect X-mount.subdir option
- fix mount test redirection (1>&1 to 2>&1)
2025-09-14 23:05:06 -07:00
John Titor
d6ed16a832 nixos/bcachefs: add boot.bcachefs.package
This allows configuring the userspace bcachefs package to use.
Similar to boot.zfs.package
2025-09-13 22:17:32 +05:30
h7x4
3c10ae2f66 nixos/networking: prefer types.ints over addCheck 2025-09-12 02:37:50 +02:00
clerie
076f59fd54 nixos/networking: network.target depends on netdev service directly
So we don't depend on addresses configured for an interface or
network-setup.service existing anymore.

Fixes #349882
2025-08-27 18:42:09 +02:00
John Titor
afbaa572ed nixos/bcachefs: remove linuxPackages_latest requirement
Nixpkgs has been on 6.12 for a while
2025-08-20 01:56:40 +05:30
John Titor
74d1da02aa nixos/bcachefs: handle / (root filesystem) in autoScrub service
Without this, the service and timer name become like this:

❯  systemctl status bcachefs-scrub--.service
○ bcachefs-scrub--.service - bcachefs scrub on /
     Loaded: loaded (/etc/systemd/system/bcachefs-scrub--.service; linked; preset: ignored)
     Active: inactive (dead)
TriggeredBy: ● bcachefs-scrub--.timer
2025-08-20 01:56:40 +05:30
Guanran Wang
7faeef0e92 nixos/btrfs: use sha256 instead of sha256_generic
Upstream dropped `sha256_generic` in e96cb9507f

Quoting from upstream:

> sha256_blocks_generic() is moved from lib/crypto/sha256-generic.c into
  lib/crypto/sha256.c.  It's now a static function marked with
  __maybe_unused, so the compiler automatically eliminates it in any
  cases where it's not used.

Co-authored-by: dramforever <dramforever@live.com>
2025-08-20 01:34:50 +05:30
Colin
a3e64d8d08 nixos: Elaborate documentation for fileSystems.* options (#405043) 2025-08-15 19:01:06 +00:00
nikstur
f087e5c94b nixos/network-interfaces: add packages to corePackages
This allows users to override (i.e. exclude) these packages from their
system closure if they don't need them.
2025-08-10 22:48:26 +02:00
nikstur
0d9a5c2059 nixos/fuse: add enable option
Fuse is stil enabled by default so the default behaviour of NixOS
doesn't change. However, now it's possible to actively exclude fuse when
you don't need it.
2025-08-10 22:43:39 +02:00
nikstur
d5ae87bdeb Revert "nixos: allow more things to be disabled" 2025-08-10 22:22:08 +02:00
Arian van Putten
1bb040fae8 nixos: allow more things to be disabled (#429695) 2025-08-10 19:49:52 +02:00
Ryan Lahfa
bcc20cad16 nixos/network-interfaces: let networkd handle privacy extensions (#431967) 2025-08-09 17:53:39 +02:00
nikstur
bb954cddf5 nixos/network-interfaces: let networkd handle privacy extensions
This removes bash from the mandatory system closure.
2025-08-09 00:10:13 +02:00
Arian van Putten
a009838396 nixos/filesystem: remove mount-pstore (#432049) 2025-08-08 21:36:03 +02:00
nikstur
e9c71d971f nixos/filesystem: remove mount-pstore
Ever since fb49d81b25 we set
CONFIG_PSTORE=y in the config because we set CONIFG_ACPI_APEI=y in the
kernel. This means we always have pstore built right into the kernel.

systemd thus always mounts `/sys/fs/pstore` which makes our custom unit
superfluous and redudant.
2025-08-08 19:03:05 +02:00
nikstur
eca55074cb nixos/fuse: add enable option
Fuse is stil enabled by default so the default behaviour of NixOS
doesn't change. However, now it's possible to actively exclude fuse when
you don't need it.
2025-07-31 20:42:36 +02:00
nikstur
f5ffdbfeb0 nixos/network-interfaces: add packages to corePackages
This allows users to override (i.e. exclude) these packages from their
system closure if they don't need them.
2025-07-31 20:42:35 +02:00
Will Fancher
0894e88e99 bcachefs: Fix systemd dependencies (#422961) 2025-07-30 14:20:15 -04:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Michele Guerini Rocco
6424dede0c nixos/network-interfaces: improve IPv6 support (#417150) 2025-07-23 16:51:24 +02:00
rnhmjoj
602006b0b6 nixos/networking-interfaces: add rnhmjoj as maintainer 2025-07-11 09:44:49 +02:00
rnhmjoj
4e5205a68a nixos/networking-interfaces: add IPIP tunnels 2025-07-11 09:44:49 +02:00
rnhmjoj
716634530e nixos/networking-interfaces: clean up networking.sits
This change rework a bit the documentation on networking.sits to explain
what they actually are. In fact, there are three different protocols
being collectively called "SIT", which itself is a nonstandard term.
2025-07-11 09:44:48 +02:00
rnhmjoj
1a8c90128b nixos/network-interfaces: add option to set source address 2025-07-11 09:44:48 +02:00
rnhmjoj
a1a86470e3 nixos/network-interfaces-scripted: disable DAD
Duplicate address detection (DAD) causes newly added IPv6 addresses to
be effectively unusable for an unpredictable amount of time, introducing
race conditions in the network setup.
For example, a "tentative" addresses is not considered a valid source
address, so installing routes can fail unpredictably.

This change disables DAD for static IPv6 addresses, with the assumption
that the user already made sure they are unique when configuring the
network.
2025-07-11 09:44:47 +02:00
ners
e801d5894f nixos/network-interfaces-systemd: fix WoL policy handling 2025-07-08 10:33:20 +02:00
Martin Weinelt
20a1869006 hostname-debian: set main program and use in more places (#422282) 2025-07-07 00:32:38 +02:00