From c5a78751f96587bf4a3704143ac81598ee6c3e5b Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 18 Mar 2023 11:58:35 -0700 Subject: hosts/carmel: reconfigure the host as a router I'm not using it as a desktop, and the current router is getting old and will likely fail in the near future. It's also a debian machine configured manually, so let's reconfigure carmel as our new router. There are three NICs in the host: 2 are 10Gb and one is 1Gb. The 1Gb will be used as the upstream interface, and one of the 10Gb will be for the LAN. There are 2 VLANs to configure: one for IoT devices and one for guest. --- modules/system/btrfs/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'modules/system/btrfs/default.nix') diff --git a/modules/system/btrfs/default.nix b/modules/system/btrfs/default.nix index d569c78..3446b2c 100644 --- a/modules/system/btrfs/default.nix +++ b/modules/system/btrfs/default.nix @@ -1,5 +1,14 @@ -{ ... }: - +{ lib, config, ... }: +let + cfg = config.my.systems.btrfs; +in { - services.btrfs.autoScrub.enable = true; + options.my.systems.btrfs = with lib; { + enable = mkEnableOption "btrfs configuration"; + }; + + config = lib.mkIf cfg.enable + { + services.btrfs.autoScrub.enable = !config.virtualisation.libvirtd.enable; + }; } -- cgit v1.2.3