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
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
thunderbolt
|
||||
];
|
||||
services.hardware.bolt.enable = true;
|
||||
}
|
|
@ -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
|
||||
];
|
||||
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
my.hardware = {
|
||||
nitrokey.enable = true;
|
||||
sound.enable = true;
|
||||
thunderbolt.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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