Commit graph

205 commits

Author SHA1 Message Date
Will Fancher 71c74bf173 nixos: Add ext to fsPackages in stage 2 with systemd-initrd enabled 2022-11-20 22:30:01 -05:00
Bryan A. S a53858010b nixos/zfs: introduce option to control hibernation 2022-10-29 04:46:27 -03:00
Edward Tjörnhammar a72e138b78 nixos/jfs: correct broken toplevel reference 2022-10-06 19:26:13 +00: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
pennae 51a11254a7 nixos/*: literalDocBook -> literalMD
no change to rendered output
2022-08-27 19:18:29 +02:00
pennae 7e7d68a250 nixos/*: mark pre-existing markdown descriptions as mdDoc 2022-08-19 22:40:58 +02:00
pennae 50f9b3107a
Merge pull request #185474 from pennae/option-docs-md
nixos/*: more options md conversion
2022-08-12 23:23:26 +02:00
Franz Pletz a7f89ddd63
Merge pull request #185763 from srhb/zfs-scrub-synchronously
nixos/zfs: scrub synchronously
2022-08-10 15:20:52 +02:00
Sarah Brofeldt ab2e77ea82 nixos/zfs: scrub synchronously
This prevents spurious systemd failures if the timer unit starts a new
scrub before a long-running one has finished.
2022-08-09 07:06:09 +02:00
Paul Haerle 944a466373
fix whitespace 2022-08-06 21:57:14 +02:00
Paul Haerle cc477fb34d
zfs: Make zpool available for zpool-expand-pools
...if cfgExpandOnBoot == "all", otherwise it fails during runtime:
```
Aug 06 19:38:05 nixos zpool-expand-pools-start[981]: /nix/store/ka3vivdray82mi9dql12yf258gkw643l-unit-script-zpool-expand-pools-start/bin/zpool-expand-pools-start: line 3: zpool: command not found
```
2022-08-06 21:51:31 +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 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 92c4b16caf
Merge pull request #171401 from klemensn/filesystems-zfs
Small ZFS handling improvements
2022-07-03 18:07:53 +02:00
Will Fancher f989e13983 zfs: Support zfs_force=y on the command line as well. 2022-05-04 18:32:27 -04:00
Will Fancher e0b5ba5479 nixos: Don't use grep to request ZFS credentials, and consider keystatus 2022-05-03 14:56:50 -04:00
Will Fancher 0a16158078 zfs: Update comment for https://github.com/zfsonlinux/zfs/pull/4943 2022-05-03 12:55:01 -04:00
Will Fancher 8555a7fdbf zfs: Allow three tries to decrypt datasets 2022-05-03 12:55:01 -04:00
Will Fancher 44a6882f55 nixos/stage-1-systemd: ZFS support 2022-05-03 12:55:00 -04:00
Klemens Nanni d1754b1ab0 nixos/filesystems/zfs: Use proper script mode
Tell zpool-list(8) to format output rather than modifying it afterwards.

Furthermore, pool names may contain spaces and would thus break due to
awk(1)'s word splitting.
2022-05-03 16:28:39 +02:00
Klemens Nanni 2a341bd2f4 nixos/filesystems/zfs: Escape dataset names
Although unlikely, ZFS happily accepts names like 'zroot/foo -r'.

Escape names and separate command line options from arguments to avoid
any kind of misinterpretation.
2022-05-03 15:56:54 +02:00
Will Fancher 2e96b64e02
Merge pull request #170123 from ElvishJerricco/systemd-shutdown-ramfs-fixup
Systemd shutdown ramfs fixup
2022-04-28 20:17:23 -04:00
Will Fancher 50925651bb zfs: Sync pools on shutdown. 2022-04-28 14:12:16 -04:00
Janne Heß 69d1acda00
nixos/xfs: Fix evaluation (#170471) 2022-04-26 21:43:01 +02:00
Janne Heß acca69992c
nixos/btrfs: Add systemd stage 1 support 2022-04-24 16:32:54 +02:00
Janne Heß 160fb93fdc
nixos/filesystems: Make most simple filesystems compatible with systemd
This includes disabling some features in the initrd by default, this is
only done when the new initrd is used. Namely, ext and bcache are
disabled by default. bcache gets an own enable option while ext is
detected like any other filesystem.
2022-04-24 16:32:34 +02:00
Graham Christensen bd3e9c3d05 nixos/zfs: better support auto-expanding partitioned disks 2022-04-07 13:06:57 -04:00
Luflosi 26a695399a
nixos/apfs: init
Add the final missing pieces for full APFS support.
2022-01-27 15:18:45 +01:00
pennae 9407761763 treewide: add defaultText for options using other shortcut bindings 2021-12-09 01:42:24 +01:00
pennae 2d564521c0 treewide: add literalDocBook text to options with complex defaults
some options have default that are best described in prose, such as
defaults that depend on the system stateVersion, defaults that are
derivations specific to the surrounding context, or those where the
expression is much longer and harder to understand than a simple text
snippet.
2021-12-09 01:38:24 +01:00
Cole Helbling 516b49155e nixos/zfs: replace parentheses with braces
The parentheses prevent the `continue` line from working by running the
enclosed in a subshell -- I noticed that ZFS would start asking me for
my password to encrypted child datasets, even though they were not
specified in `requestEncryptionCredentials`. The following logs would
also be present in the import unit's journal:

    Oct 31 22:13:17 host systemd[1]: Starting Import ZFS pool "pool"...
    Oct 31 22:13:44 host zfs-import-pool-start[3711]: importing ZFS pool "pool"...
    Oct 31 22:13:44 host zfs-import-pool-start[4017]:pool/nix/store/39zij3xcxn4w38v6x8f88bx8y91nv0rm-unit-script-zfs-import-pool-start/bin/zfs-import-pool-start: line 31: continue: only meaningful in a `for', `while', or `until' loop
    Oct 31 22:13:44 host zfs-import-pool-start[4020]:pool/nix/store/39zij3xcxn4w38v6x8f88bx8y91nv0rm-unit-script-zfs-import-pool-start/bin/zfs-import-pool-start: line 31: continue: only meaningful in a `for', `while', or `until' loop
    Oct 31 22:15:14 host zfs-import-pool-start[4023]: Failed to query password: Timer expired
    Oct 31 22:15:14 host zfs-import-pool-start[4024]: Key load error: encryption failure
    Oct 31 22:15:14 host systemd[1]: zfs-import-pool.service: Main process exited, code=exited, status=255/EXCEPTION
    Oct 31 22:15:14 host systemd[1]: zfs-import-pool.service: Failed with result 'exit-code'.
    Oct 31 22:15:14 host systemd[1]: Failed to start Import ZFS pool "pool".
2021-11-03 04:59:46 -04:00
Naïm Favier 2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
rnhmjoj fedd7cd690
nixos: explicitely set security.wrappers ownership
This is slightly more verbose and inconvenient, but it forces you
to think about what the wrapper ownership and permissions will be.
2021-09-13 13:48:13 +02:00
Sandro 49b5beea43
Merge pull request #128624 from vs49688/exfat 2021-08-25 12:24:39 +02:00
Your Name 4bb4bcc30c services.zfs.expandOnBoot: support expanding pools on boot
Either enumerating a list of pools to expand or expanding
all pools on boot.
2021-08-24 15:01:08 -04:00
Zane van Iperen a049d84229
nixos/filesystems/exfat: use "exfatprogs" instead of "exfat" if kernel > 5.7
5.7+ comes with a native exfat implementation, exfatprogs should be used instead.

The exfat package puts a "mount.exfat" binary in the path, which causes
mount to prefer the FUSE version to the non-fuse one. There's no way to
disable the binary, so switch to exfatprogs.
2021-08-24 03:31:41 +10:00
Atemu f879395bd9
nixos/btrfs: handle new checksum types in initrd (#126158)
Can't mount a root formatted with those otherwise
2021-07-06 09:57:10 -04:00
Jens Nolte 22e797947b
nixos/zfs: Add defaultText for 'boot.zfs.package'-option (#122002) 2021-05-13 17:40:10 -04:00
Jörg Thalheim fc02b14738
Merge pull request #117071 from mohe2015/hotfix-zfs-grub
nixos/zfs: Fix regression that prevents people to boot from zfs using grub if they didn't add zfs to boot.initrd.supportedFilesystems
2021-04-17 16:01:22 +01:00
Alyssa Ross b0854238b0 nixos/zfs: fix autoScrub.enable description
This was previously "Whether to enable Enables periodic scrubbing of
ZFS pools.."
2021-04-01 19:19:00 +00:00
Hedtke, Moritz 742f3a4369
nixos/zfs: Fix regression that prevents people to boot from zfs using grub if they didn't add zfs to boot.initrd.supportedFilesystems
See https://github.com/NixOS/nixpkgs/pull/99386
2021-03-20 23:57:50 +01:00
Cole Helbling 1ed5b6a285
zfs: disable smartmontools mail functionality 2021-02-06 22:04:00 -08:00
Cole Helbling 370df31f1c
nixos/zfs: make zed mail optional
"zed does not need the ability to send email by default" --Eelco
2021-02-06 22:03:59 -08:00
Jörg Thalheim 5b9bfe5625
zfs: fix invalid package references 2021-02-03 11:45:31 +01:00
Jörg Thalheim 0e784a2a3b
nixos/zfs: fix reference to awk
broken in 648a6c4348
2021-02-03 11:43:00 +01:00
Jörg Thalheim 9c6a9d0458
nixos/lxd: refactor to use zfs.package/enabled property 2021-02-01 17:59:18 +01:00
Jörg Thalheim ed1f13244b
nixos/zfs: expose enabled option 2021-02-01 17:59:18 +01:00
Jörg Thalheim 648a6c4348
nixos/zfs: expose zfs package as readonly attribute 2021-02-01 17:59:14 +01:00
volth bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00