hardware/thunderbolt: modularize

This commit is contained in:
Felix Buehler 2023-01-08 00:46:09 +01:00
parent 081fee5481
commit 0ba8d93008
5 changed files with 18 additions and 8 deletions

View file

@ -1,7 +0,0 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
thunderbolt
];
services.hardware.bolt.enable = true;
}

View file

@ -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
];

View file

@ -9,5 +9,6 @@
my.hardware = {
nitrokey.enable = true;
sound.enable = true;
thunderbolt.enable = true;
};
}

View file

@ -5,5 +5,6 @@
imports = [
./nitrokey
./sound
./thunderbolt
];
}

View file

@ -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;
};
}