Files
machine_setup/nix/configuration/roles/thunderbolt/default.nix
2026-06-17 13:08:11 -04:00

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";
# })
# ];
};
}