rizin: add module
This adds a basic module for rizin which supports creating a basic rizinrc for configuration.
This commit is contained in:
parent
1dcebb44c6
commit
168fbe8891
5 changed files with 86 additions and 0 deletions
44
modules/programs/rizin.nix
Normal file
44
modules/programs/rizin.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.rizin;
|
||||
in
|
||||
{
|
||||
meta.maintainers = [
|
||||
lib.hm.maintainers.rsahwe
|
||||
];
|
||||
|
||||
options = {
|
||||
programs.rizin = {
|
||||
enable = lib.mkEnableOption "Rizin";
|
||||
|
||||
package = lib.mkPackageOption pkgs "rizin" { nullable = true; };
|
||||
|
||||
extraConfig = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
e asm.bytes=true
|
||||
e asm.bytes.space=true
|
||||
'';
|
||||
description = ''
|
||||
Run configuration written to {file}`rizinrc`.
|
||||
See <https://book.rizin.re/src/configuration/initial_scripts.html>
|
||||
for more information.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
xdg.configFile."rizin/rizinrc" = lib.mkIf (cfg.extraConfig != "") {
|
||||
text = cfg.extraConfig;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue