forked from nyanloutre/nixos-config
Règles udev Ledger packagé
This commit is contained in:
parent
60d3384769
commit
11695af32b
18
overlays/ledger-udev-rules.nix
Normal file
18
overlays/ledger-udev-rules.nix
Normal file
@ -0,0 +1,18 @@
|
||||
self: super:
|
||||
|
||||
{
|
||||
ledger-udev-rules = super.writeTextFile {
|
||||
name = "ledger-udev-rules";
|
||||
text = ''
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="users"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="users"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="users"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="users"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="users"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="users"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="users"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="users"
|
||||
'';
|
||||
destination = "/etc/udev/rules.d/99-ledger.rules";
|
||||
};
|
||||
}
|
@ -15,6 +15,7 @@
|
||||
(import ../../overlays/neovim.nix)
|
||||
(import ../../overlays/steam.nix)
|
||||
(import ../../overlays/steamcontroller-udev-rules.nix)
|
||||
(import ../../overlays/ledger-udev-rules.nix)
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
@ -28,7 +29,10 @@
|
||||
|
||||
hardware.u2f.enable = true;
|
||||
|
||||
services.udev.packages = [pkgs.steamcontroller-udev-rules];
|
||||
services.udev.packages = with pkgs; [
|
||||
steamcontroller-udev-rules
|
||||
ledger-udev-rules
|
||||
];
|
||||
|
||||
networking.hostName = "rog-paul"; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
@ -142,18 +146,6 @@
|
||||
)
|
||||
];
|
||||
|
||||
# Ledger udev rules
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="ledger"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="ledger"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="ledger"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="ledger"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="ledger"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="ledger"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="ledger"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", TAG+="uaccess", TAG+="udev-acl", GROUP="ledger"
|
||||
'';
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
@ -189,9 +181,8 @@
|
||||
users.extraUsers.paul = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
extraGroups = [ "wheel" "networkmanager" "ledger" "wireshark" ];
|
||||
extraGroups = [ "wheel" "networkmanager" "wireshark" ];
|
||||
};
|
||||
users.extraGroups.ledger = { };
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user