1
0
Fork 0
nix-config/modules/nixos/services/btrfs/default.nix

24 lines
397 B
Nix

{
lib,
config,
pkgs,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.services.btrfs;
in
{
options.${namespace}.services.btrfs = {
enable = mkBoolOpt true "BTRFS";
};
config = mkIf cfg.enable {
services.btrfs.autoScrub.enable = true;
services.fstrim.enable = true;
environment.systemPackages = with pkgs; [ btrfs-progs ];
};
}