31 lines
505 B
Nix
31 lines
505 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
cfg = config.global.fs;
|
|
in
|
|
{
|
|
options.global.fs.bcachefs = {
|
|
options = mkOption {
|
|
type = with types; listOf str;
|
|
default = [
|
|
"noatime"
|
|
"compression=zstd"
|
|
];
|
|
description = "bcachefs mount options";
|
|
};
|
|
};
|
|
|
|
config = mkIf (cfg.type == "bcachefs") {
|
|
fileSystems."/nix" = {
|
|
inherit (cfg.bcachefs) options;
|
|
device = "/dev/disk/by-uuid/${cfg.store}";
|
|
fsType = "bcachefs";
|
|
};
|
|
};
|
|
}
|