39 lines
788 B
Nix
39 lines
788 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [ ];
|
|
|
|
options.me = {
|
|
thunderbolt.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
example = true;
|
|
description = "Whether we want to install thunderbolt.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.me.thunderbolt.enable {
|
|
environment.systemPackages = with pkgs; [
|
|
bolt # For boltctl
|
|
];
|
|
|
|
services.hardware.bolt.enable = true;
|
|
|
|
# Trust all thunderbolt devices
|
|
# services.udev.packages = [
|
|
# (pkgs.writeTextFile {
|
|
# name = "removable";
|
|
# text = ''
|
|
# ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"
|
|
# '';
|
|
# destination = "/etc/udev/rules.d/99-removable.rules";
|
|
# })
|
|
# ];
|
|
};
|
|
}
|