103 lines
2.4 KiB
Nix
103 lines
2.4 KiB
Nix
{ inputs, lib, config, pkgs, system, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.modules.desktop.vicinae;
|
|
in {
|
|
options.modules.desktop.vicinae = {
|
|
enable = mkEnableOption "Enable vicinae, a launcher built in react";
|
|
dmenu = mkEnableOption "Use as a replacement for dmenu";
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = inputs.vicinae.packages.${system}.default;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
hm.services.vicinae = {
|
|
enable = true;
|
|
package = cfg.package;
|
|
systemd = {
|
|
enable = true;
|
|
autoStart = true;
|
|
environment = {
|
|
USE_LAYER_SHELL = 1;
|
|
};
|
|
};
|
|
|
|
settings = {
|
|
"$schema" = "https://vicinae.com/schemas/config.json";
|
|
|
|
# i disagree with these
|
|
telemetry.system_info = false;
|
|
|
|
pop_to_root_on_close = true;
|
|
|
|
launcher_window = {
|
|
opacity = 0.8;
|
|
|
|
client_side_decorations.enabled = true;
|
|
client_side_decorations.border_width = 0;
|
|
client_side_decorations.rounding = config.modules.desktop.themes.rounding;
|
|
|
|
layer_shell = {
|
|
enabled = true;
|
|
keyboard_interactivity = "exclusive";
|
|
layer = "top";
|
|
};
|
|
};
|
|
|
|
favorites = [
|
|
"core:search-emojis"
|
|
"clipboard:history"
|
|
];
|
|
|
|
providers = {
|
|
core.entrypoints = {
|
|
keybind-settings.enabled = false;
|
|
report-bug.enabled = false;
|
|
sponsor.enabled = false;
|
|
};
|
|
applications = {
|
|
preferences = {
|
|
defaultAction = "launch";
|
|
};
|
|
};
|
|
|
|
manage-shortcuts.enabled = false;
|
|
theme.enabled = false;
|
|
developer.enabled = false;
|
|
};
|
|
|
|
fallbacks = [ "files:search" ];
|
|
|
|
escape_key_behavior = "close_window";
|
|
|
|
font = let
|
|
fonts = config.modules.desktop.fonts.fonts;
|
|
in {
|
|
normal = { inherit (fonts.sansSerif) family size; };
|
|
};
|
|
};
|
|
|
|
extensions = with inputs.vicinae-extensions.packages.${system}; [
|
|
nix
|
|
] ++ optional config.modules.desktop.niri.enable niri;
|
|
};
|
|
|
|
user.packages = mkIf cfg.dmenu [ (pkgs.writeShellScriptBin "dmenu" ''
|
|
set -euo pipefail
|
|
|
|
prompt="select option"
|
|
|
|
while [ $# -gt 0 ]; do
|
|
case "$1" in
|
|
-p) shift; prompt="$1" ;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
vicinae dmenu --placeholder "$prompt"
|
|
'') ];
|
|
};
|
|
}
|