Flake: cleanup

This commit is contained in:
Filippo Berto 2023-04-08 15:14:48 +02:00
parent 016bf7c189
commit a4fa0c206a
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
7 changed files with 47 additions and 155 deletions

View file

@ -1,15 +0,0 @@
{ lib, config, ... }:
let
inherit (builtins) mapAttrs attrValues;
inherit (lib) filterAttrs unique;
btrfsFileSystems =
filterAttrs (_k: v: v.fsType == "btrfs") config.fileSystems;
btrfsDevices =
unique (attrValues (mapAttrs (_: v: v.device) btrfsFileSystems));
in
{
services.btrfs.autoScrub = {
enable = btrfsDevices != [ ];
fileSystems = btrfsDevices;
};
}