Move many server modules to basic

This commit is contained in:
Filippo Berto 2024-08-13 12:07:24 +02:00
parent 36a04eada8
commit 7247e543c0
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
6 changed files with 7 additions and 7 deletions

View file

@ -0,0 +1,15 @@
{ 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;
};
}