modularise the stuff

This commit is contained in:
tristan 2023-05-08 16:59:12 +01:00
parent 011009d22f
commit d1bcbc0fde
16 changed files with 159 additions and 61 deletions

View file

@ -5,14 +5,13 @@ let
pkg = editor.package;
terminal = config.programs.terminal.package;
termcmd = "${terminal}/bin/${terminal.pname}";
menu = "wofi --show dmenu";
menu = config.programs.menu.package+config.programs.menu.dmenuCommand;
in
{
options.programs = {
editor = {
enable = mkEnableOption "editor";
package = mkPackageOption pkgs "vscodium" {
default = pkgs.vscodium;
example = "pkgs.vscode";
};
neovim = mkEnableOption "neovim mode";
@ -37,7 +36,7 @@ in
clone-repo)
url=$(wl-paste)
${termcmd} -e -- git clone "$url" ;;
*) [ -e "$repo" ] && ${pkg}/bin/${pkg.pname} $repo ;;
*) [ -e "$repo" ] && ${pkg}/bin/${pkg.executableName} $repo ;;
esac
'';
install = false;