feat(nix): stm32 device rules
This commit is contained in:
parent
47bed4aec0
commit
463a840f8c
5 changed files with 174 additions and 2 deletions
25
hosts/config/stm32/default.nix
Normal file
25
hosts/config/stm32/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ lib, pkgs, config, ...}:
|
||||
|
||||
let
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
stitchyconf = {
|
||||
dev.stm32.enable = lib.mkEnableOption "Enables STM32 Development";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
# Group for probe-rs rules
|
||||
users.groups.plugdev = {};
|
||||
|
||||
# Udev Files
|
||||
services.udev.packages = lib.mkIf config.stitchyconf.dev.stm32.enable [
|
||||
(pkgs.writeTextFile {
|
||||
name = "probe-rs-udev";
|
||||
destination = "/etc/udev/rules.d/69-probe-rs.rules";
|
||||
text = (builtins.readFile ./probe-rs.rules);
|
||||
})];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue