1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
Commit graph

958 commits

Author SHA1 Message Date
Andrew Marshall 9ce881027b zfs: remove recommendations to use unstable
`pkgs.zfs_unstable` is pre-release software and may very well have
critical bugs that make it unsuitable for general use. As such, we
should not recommend it as a general solution to the problem of "my
Kernel is too new for stable ZFS".
2024-11-01 18:50:24 -04:00
Andrew Marshall a0de415588 nixos/zfs: improve docs for boot.zfs.devNodes option
Specify more clearly how this is used, and defer to upstream docs for
guidance on selecting it.
2024-10-31 09:04:11 -04:00
Andrew Marshall 0f69b960b8 nixos/zfs: teach to override devNodes per pool
This may be useful if some pools use LUKS or some other intermediate
layer, while others do not.
2024-10-30 10:41:18 -04:00
Sandro Jäckel 91cf1d31c8 nixos/zfs: fix shellcheck findings with enableStrictShellChecks enabled 2024-10-30 08:33:57 +00:00
Masum Reza cb9ac608fc
nixos/{bcache,lvm}: enable when using systemd in stage 1 initrd (#343760) 2024-10-10 12:16:31 +05:30
Bjørn Forsman 20a3012813 nixos/networking: improve vlan service description
VLAN is an abbreviation, so let's not write Vlan.
2024-10-04 22:09:01 +02:00
Bjørn Forsman e8da2c8981 nixos/networking: fix macvlan service description
Fix copy pasta from the vlan service: Vlan -> MACVLAN
2024-10-04 22:08:40 +02:00
Franz Pletz cc2142b9f0
nixos/zfs: remove incorrect conditional use of spl kmod; remove withs (#344271) 2024-09-28 15:30:13 +02:00
Andrew Marshall bec753ddfc nixos/zfs: replace with with let
The fully-qualified name would certainly be a lot here, but `with` can
still be unclear even with narrow scope. A short `let` adds clarity
without significantly increasing verbosity.
2024-09-27 08:08:31 -04:00
Andrew Marshall eef4c18ae8 nixos/zfs: remove unused vars 2024-09-27 08:08:31 -04:00
Andrew Marshall 33bd85a6c8 nixos/zfs: remove top-level withs
As it is generally considered an anti-pattern. Removing them here in
fact exposed one bug (see previous commit).
2024-09-27 08:08:30 -04:00
Andrew Marshall 06ed2c46fb nixos/zfs: remove incorrect conditional use of spl kmod
This was incorrectly getting `lib.version` which is e.g.
`"24.11pre-git"`, but should have been the ZFS package version. However,
the condition, at least per the comment, is reversed and should be
instead `versionOlder cfgZfs.package.version "2.2.0"`. However, the
entire premise seems to be incorrect, as ZFS 2.2.6 includes the spl
module. Since the previous condition here was effectively always true,
it would initially seem the best move is to remove the conditional
altogether and always include the spl kmod. However, going back to
4360a87c45 where this condition was added,
the intent appears to be that spl was no longer needed here in
the-pre-release ZFS (long since in all supported versions), due to it
being merged into ZFS mainline. Given that intent and that our boot
tests on all versions succeed without including it in the initrd, remove
it.
2024-09-27 08:08:30 -04:00
Artturin ecd4ea0ab2
nixos/auto-upgrade: correct typo in assertion message (#295125) 2024-09-25 20:41:02 +03:00
Patrick Collins 448240f6e2
nixos/nfsd: fix typo that breaks services.nfs.settings (#342200)
Currently will always fail when nfs.server.hostName is specified alongside nfs.settings.
2024-09-25 20:33:23 +03:00
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
John Titor 468a6cbbbe
nixos/bcache: enable bcache when using systemd in stage 1 initrd 2024-09-22 23:37:51 +05:30
John Titor 3f90386b24
nixos/lvm: enable lvm when using systemd in stage 1 initrd
Fixes https://github.com/NixOS/nixpkgs/issues/343566
2024-09-22 22:04:30 +05:30
Felix Buehler dd7ab59690 nixos/services.nfs: remove with lib; 2024-09-15 10:43:58 +02:00
github-actions[bot] b6b2ac4f61
Merge master into staging-next 2024-09-07 00:12:59 +00:00
Aaron Ecay 345618de26
nixos/zfs: mitigate data loss issues when resuming from hibernation 2024-09-06 13:39:21 -04:00
github-actions[bot] fab50d5f8d
Merge staging-next into staging 2024-08-31 00:13:46 +00:00
Philip Taron 9916dc8728
treewide/nixos: remove with lib; part 2 (#335618) 2024-08-30 15:56:57 -07:00
Felix Buehler cd197cebdf nixos/system.autoUpgrade: remove with lib; 2024-08-30 23:01:45 +02:00
Will Fancher c653608dcd overlayfs: Assert that upperdir == null requires systemd initrd 2024-08-30 15:18:36 -04:00
Will Fancher 160ff9ff9c overlayfs: Use depends 2024-08-30 15:18:36 -04:00
Will Fancher b7c5fd93f1 nixos: Support fileSystems.<name>.depends with fstab-generator 2024-08-30 15:18:35 -04:00
github-actions[bot] 3b85a864c3
Merge staging-next into staging 2024-08-26 18:04:37 +00:00
Jörg Thalheim f40cd1bfe0 nixos/autoUpgrade: add --refresh when using flakes
otherwise the cache might delay updates quite a bit
2024-08-26 12:02:38 +02:00
ajs124 bd0539cb20 nixos/tasks/lvm: assert kernel version for vdo 2024-08-23 19:59:34 +02:00
ajs124 9366ef0fbd vdo: 8.2.2.2 -> 8.3.0.71 2024-08-23 19:59:33 +02:00
ajs124 ee6a0e376d kvdo: drop 2024-08-23 19:59:31 +02:00
7c6f434c da64ac6beb
Merge pull request #310807 from Naxdy/work/improve-btrfs-autoscrub
nixos/btrfs: refactor & improve device selection for autoScrub
2024-08-03 15:31:32 +00:00
misuzu 4df3c4c17b nixos/clevis: add support for parent encrypted zfs datasets 2024-06-12 21:21:50 +03:00
Michele Guerini Rocco 9e97770a19
Merge pull request #312317 from tom-kuca/replace-existing-network-addresses
nixos/network-interfaces: prevent failure when a network address already exists
2024-06-03 15:30:13 +02:00
Maximilian Bosch 3cf4304692
Revert "nixos/networking: use mkIfs on the inner attributes" 2024-05-31 13:05:19 +02:00
Linus Heckemann cf50bd0aa1 nixos/networking: use mkIfs on the inner attributes
This is a bit more compact and yields the same evaluation results.
2024-05-23 17:46:15 +02:00
Maximilian Bosch f9f943b36e
nixos/networking: use optionalAttrs -> mkIf for networkd route generation
Suggested in https://github.com/NixOS/nixpkgs/pull/312472#discussion_r1605894882
2024-05-20 17:30:21 +02:00
Maximilian Bosch c4fd7cf16d
nixos/networkd: get rid of *Config attributes in lists
This patch is about removing `wireguardPeerConfig`,
`dhcpServerStaticLeaseConfig` - a.k.a. the
AbstractSingletonProxyFactoryBean of nixpkgs - and friends.

As a former colleague said

> worst abstraction ever

I second that. I've written enough networkd config for NixOS systems so
far to have a strong dislike. In fact, these don't even make sense:
`netdevs.wireguardPeers._.wireguardPeerConfig` will be rendered into
the key `[WireGuardPeer]` and every key from `wireguardPeerConfig` is in
there. Since it's INI, there's no place where sections on the same level
as wireguardPeerConfig fit into. Hence, get rid of it all.

For the transition, using the old way is still allowed, but gives a
warning. I think we could drop this after one release.

The tests of rosenpass and systemd-networkd-dhcpserver-static-leases
were broken on the rev before, hence they were updated, but are still
not building.
2024-05-20 17:26:42 +02:00
Tomáš Kuča 71ce6b582b
nixos/network-interfaces: prevent failure when a network address already exists
The original code tests output of `ip addr add` command to detect if an
adress already exists. The error message was changed in the past and the
test no longer works.

The patch replaces `ip addr add` with `ip addr replace`. The new command
replaces an existing address or creates a new one if there isn't any.

fixes 306841
2024-05-17 01:02:29 +02:00
Naxdy d0239a1e50
nixos/btrfs: improve default selection of filesystems for autoScrub 2024-05-11 12:10:38 +02:00
Naxdy 804bc033a6
nixos/btrfs: refactor global with lib; 2024-05-11 11:50:58 +02:00
Franz Pletz 338a208e7d
Merge pull request #287505 from jpds/zfs-scrub-trim-randomizedDelaySec 2024-05-10 02:11:13 +02:00
Jonathan Davies 8e0e9bdee8 nixos/zfs: Added a randomizedDelaySec option to ZFS autoscrub/trim timers
Allows operators to space out these IO operations across a fleet of
machines, rather than have them all happen at the same time.
2024-05-03 15:01:53 +01:00
Jonathan Davies 5b671b7fc8 nixos/zfs: Default autoscrub interval to monthly 2024-05-03 13:41:51 +01: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
Luís Fonseca 38b68216a5
nixos/zfs: install zfs udev rules on stage1
Install zfs udev rules on initrd, so that /dev/zvol gets populated.
2024-04-08 02:53:01 +01:00
Matt Moriarity 10035ed5ab nixos/bcachefs: support unlock with clevis in systemd stage 1 2024-04-05 14:39:11 +00:00
Aaron Andersen c4719710f0
Merge pull request #298068 from posch/manage-gids
nixos/nfsd: settings for /etc/nfs.conf
2024-04-01 16:15:10 +00:00
Tobias Poschwatta ee2b899ff7 nixos/nfsd: settings for /etc/nfs.conf
services.nfs.settings is added for options that go into /etc/nfs.conf.

There are services.nfs.server.extraNfsdConfig and
services.nfs.extraConfig, but they have drawbacks.  They overlap in
scope (nfs.extraConfig can also add nfsd options). They require that one
writes INI syntax. They often produce nfs.conf files with duplicate
section names, which is confusing.

This deprecates services.nfs.server.extraNfsdConfig and
services.nfs.extraConfig.

services.nfs.settings cannot be used together with
services.nfs.server.extraNfsdConfig or services.nfs.extraConfig.
2024-03-25 12:22:48 +01:00
Jörg Thalheim 3a8e8369a6 envfs: 1.0.3 -> 1.0.6
Diff: https://github.com/Mic92/envfs/compare/1.0.3...1.0.6
2024-03-24 10:26:45 +01:00