nixdots/options/home/preferences.nix

36 lines
1.5 KiB
Nix
Raw Normal View History

2024-07-26 23:07:07 +00:00
{lib, ...}: let
2024-06-24 19:12:59 +00:00
inherit (lib) mkOption types;
2024-07-26 23:07:07 +00:00
mkPreferenceCmdOption = name: commandDefault:
mkOption {
type = types.str;
description = "The command to start your preferred ${name}.";
default = commandDefault;
};
2024-06-24 19:12:59 +00:00
2024-07-26 23:07:07 +00:00
mkPreferenceDesktopOption = name: desktopDefault:
mkOption {
type = types.str;
description = "The desktop (application) file for your preferred ${name}.";
default = desktopDefault;
};
2024-06-24 19:12:59 +00:00
mkPreferenceOptions = name: commandDefault: desktopDefault: {
2024-07-26 23:07:07 +00:00
command = mkPreferenceCmdOption name commandDefault;
2024-06-24 19:12:59 +00:00
desktop = mkPreferenceDesktopOption name desktopDefault;
};
2024-07-26 23:07:07 +00:00
in {
2024-06-24 19:12:59 +00:00
options.myOptions.home-manager.preferences = {
browser = mkPreferenceOptions "browser" "firefox" "firefox.desktop";
terminalEmulator = mkPreferenceOptions "terminal emulator" "kitty" "kitty.desktop";
textEditor = mkPreferenceOptions "editor" "nvim" "nvim.desktop";
fileManager = mkPreferenceOptions "file manager" "pcmanfm-qt" "pcmanfm-qt.desktop";
imageViewer = mkPreferenceOptions "image viewer" "qimgv" "qimgv.desktop";
mediaPlayer = mkPreferenceOptions "media player" "mpv" "mpv.desktop";
archiveManager = mkPreferenceOptions "archive manager" "ark" "org.kde.ark.desktop";
documentViewer = mkPreferenceOptions "document viewer" "firefox" "firefox.desktop"; # TODO: consider zathura (org.pwmt.zathura.desktop.desktop)
emailClient = mkPreferenceOptions "email client" "firefox" "firefox.desktop";
launcher.command = mkPreferenceCmdOption "launcher" "walker";
};
}