-zfs
This commit is contained in:
parent
e1cbf930a8
commit
ec351aae64
2 changed files with 19 additions and 2 deletions
|
|
@ -12,7 +12,22 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
with lib.custom; {
|
with lib.custom; let
|
||||||
|
zfsCompatibleKernelPackages =
|
||||||
|
lib.filterAttrs (
|
||||||
|
name: kernelPackages:
|
||||||
|
(builtins.match "linux_[0-9]+_[0-9]+" name)
|
||||||
|
!= null
|
||||||
|
&& (builtins.tryEval kernelPackages).success
|
||||||
|
&& (!kernelPackages.${config.boot.zfs.package.kernelModuleAttribute}.meta.broken)
|
||||||
|
)
|
||||||
|
pkgs.linuxKernel.packages;
|
||||||
|
latestKernelPackage = lib.last (
|
||||||
|
lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)) (
|
||||||
|
builtins.attrValues zfsCompatibleKernelPackages
|
||||||
|
)
|
||||||
|
);
|
||||||
|
in {
|
||||||
facter.reportPath =
|
facter.reportPath =
|
||||||
if (builtins.pathExists ./facter.json)
|
if (builtins.pathExists ./facter.json)
|
||||||
then ./facter.json
|
then ./facter.json
|
||||||
|
|
@ -20,6 +35,8 @@ with lib.custom; {
|
||||||
imports = lib.snowfall.fs.get-non-default-nix-files ./. ++ [./services];
|
imports = lib.snowfall.fs.get-non-default-nix-files ./. ++ [./services];
|
||||||
#systemd.network.wait-online.enable = lib.mkForce false; #facter
|
#systemd.network.wait-online.enable = lib.mkForce false; #facter
|
||||||
boot.supportedFilesystems = ["zfs"];
|
boot.supportedFilesystems = ["zfs"];
|
||||||
|
# Note this might jump back and forth as kernels are added or removed.
|
||||||
|
boot.kernelPackages = latestKernelPackage;
|
||||||
networking.hostId = "049b86a7"; # head -c4 /dev/urandom | od -A none -t x4
|
networking.hostId = "049b86a7"; # head -c4 /dev/urandom | od -A none -t x4
|
||||||
services.zfs.autoScrub = {
|
services.zfs.autoScrub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ in {
|
||||||
mode = "raidz2";
|
mode = "raidz2";
|
||||||
options.compression = "zstd";
|
options.compression = "zstd";
|
||||||
options.ashift = "12";
|
options.ashift = "12";
|
||||||
mountpoint = "/zstorage";
|
mountpoint = "/zstorage";
|
||||||
datasets = {
|
datasets = {
|
||||||
services = {
|
services = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue