rizin: cleanup according to feedback
In both prior feature pull requests for this module there was a review after the pull request got merged, those are addressed here.
This commit is contained in:
parent
a455ac1bb3
commit
ba197beccc
5 changed files with 7 additions and 14 deletions
|
|
@ -6,7 +6,6 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.programs.rizin;
|
||||
eValueType = with lib.types; either str (either int (either bool float));
|
||||
in
|
||||
{
|
||||
meta.maintainers = [
|
||||
|
|
@ -20,7 +19,7 @@ in
|
|||
package = lib.mkPackageOption pkgs "rizin" { nullable = true; };
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.attrsOf eValueType;
|
||||
type = with lib.types; attrsOf (either str (either int (either bool float)));
|
||||
default = { };
|
||||
example = {
|
||||
"asm.bytes" = true;
|
||||
|
|
@ -53,11 +52,7 @@ in
|
|||
|
||||
config =
|
||||
let
|
||||
configFile =
|
||||
if config.xdg.enable && config.home.preferXdgDirectories then
|
||||
"${config.xdg.configHome}/rizin/rizinrc"
|
||||
else
|
||||
".rizinrc";
|
||||
configFile = if config.xdg.enable then "${config.xdg.configHome}/rizin/rizinrc" else ".rizinrc";
|
||||
configContent = ''
|
||||
# settings
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v: "e ${k}=${lib.toString v}") cfg.settings)}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists "home-files/.rizinrc"
|
||||
assertFileExists "home-files/.config/rizin/rizinrc"
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
rizin-basic-configuration = ./basic-configuration.nix;
|
||||
rizin-disabled-configuration = ./disabled-configuration.nix;
|
||||
rizin-prefer-xdg = ./prefer-xdg.nix;
|
||||
rizin-xdg-disabled = ./xdg-disabled.nix;
|
||||
rizin-settings-configuration = ./settings-configuration.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists "home-files/.rizinrc"
|
||||
assertFileExists "home-files/.config/rizin/rizinrc"
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
xdg.enable = true;
|
||||
|
||||
home.preferXdgDirectories = true;
|
||||
xdg.enable = false;
|
||||
|
||||
programs.rizin = {
|
||||
enable = true;
|
||||
|
|
@ -12,6 +10,6 @@
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists "home-files/.config/rizin/rizinrc"
|
||||
assertFileExists "home-files/.rizinrc"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue