WIP refactor
This commit is contained in:
parent
6a2683a770
commit
699a3af19a
16 changed files with 342 additions and 144 deletions
33
common/programs/qFlipper.nix
Normal file
33
common/programs/qFlipper.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../config.nix;
|
||||
cfg_path = [
|
||||
ccfg.custom_config_key
|
||||
"programs"
|
||||
"qFlipper"
|
||||
];
|
||||
cfg = lib.attrsets.getAttrFromPath cfg_path config;
|
||||
in
|
||||
{
|
||||
options =
|
||||
{ }
|
||||
// lib.attrsets.setAttrByPath cfg_path {
|
||||
enable = lib.mkEnableOption "qFlipper";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.flipperzero.enable = true;
|
||||
environment.systemPackages = with pkgs; [ qFlipper ];
|
||||
services.udev.extraRules = ''
|
||||
#Flipper Zero serial port
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{manufacturer}=="Flipper Devices Inc.", GROUP="users", TAG+="uaccess"
|
||||
#Flipper Zero DFU
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ATTRS{manufacturer}=="STMicroelectronics", GROUP="users", TAG+="uaccess"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue