diff --git a/legacy/modules/thunderbolt.nix b/legacy/modules/thunderbolt.nix deleted file mode 100644 index 64b734b..0000000 --- a/legacy/modules/thunderbolt.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ - thunderbolt - ]; - services.hardware.bolt.enable = true; -} diff --git a/machines/thinkman/configuration.nix b/machines/thinkman/configuration.nix index 961f669..b73fa26 100644 --- a/machines/thinkman/configuration.nix +++ b/machines/thinkman/configuration.nix @@ -30,7 +30,6 @@ ../../legacy/modules/systemd-user.nix ../../legacy/modules/systemduefi.nix #../../legacy/modules/tex.nix - ../../legacy/modules/thunderbolt.nix ../../legacy/modules/webcam.nix ]; diff --git a/machines/thinkman/hardware-configuration.nix b/machines/thinkman/hardware-configuration.nix index dd71ad9..3050bb6 100644 --- a/machines/thinkman/hardware-configuration.nix +++ b/machines/thinkman/hardware-configuration.nix @@ -9,5 +9,6 @@ my.hardware = { nitrokey.enable = true; sound.enable = true; + thunderbolt.enable = true; }; } diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index d789325..26c115d 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -5,5 +5,6 @@ imports = [ ./nitrokey ./sound + ./thunderbolt ]; } diff --git a/modules/hardware/thunderbolt/default.nix b/modules/hardware/thunderbolt/default.nix new file mode 100644 index 0000000..29bac56 --- /dev/null +++ b/modules/hardware/thunderbolt/default.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.my.hardware.thunderbolt; +in +{ + options.my.hardware.thunderbolt = { + enable = lib.mkEnableOption "thunderbolt configuration"; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + thunderbolt + ]; + services.hardware.bolt.enable = true; + }; +}