mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
hardware/thunderbolt: modularize
This commit is contained in:
parent
081fee5481
commit
0ba8d93008
5 changed files with 18 additions and 8 deletions
|
@ -5,5 +5,6 @@
|
|||
imports = [
|
||||
./nitrokey
|
||||
./sound
|
||||
./thunderbolt
|
||||
];
|
||||
}
|
||||
|
|
16
modules/hardware/thunderbolt/default.nix
Normal file
16
modules/hardware/thunderbolt/default.nix
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue