Add options for enabling launcher programs

This commit is contained in:
ItsDrike 2024-06-10 20:06:57 +02:00
parent 705ef3451a
commit 739d5019d3
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
5 changed files with 61 additions and 21 deletions

View file

@ -1,13 +1,20 @@
{ {
osConfig,
pkgs, pkgs,
lib,
... ...
}: { }: let
home.packages = with pkgs; [ inherit (lib) mkIf;
walker cfg = osConfig.myOptions.programs.launchers.walker;
]; in: {
config = mkIf cfg.enable {
home.packages = with pkgs; [
walker
];
xdg.configFile = { xdg.configFile = {
"walker/config.json".source = ./config.json; "walker/config.json".source = ./config.json;
"walker/style.css".source = ./style.css; "walker/style.css".source = ./style.css;
};
}; };
} }

View file

@ -1,17 +1,26 @@
_: { {
programs.wofi = { osConfig,
enable = true; lib,
settings = { ...
width = "40%"; }: let
height = "30%"; inherit (lib) mkIf;
show = "drun"; cfg = osConfig.myOptions.programs.launchers.wofi;
prompt = "Search"; in: {
allow_images = true; config = mkIf cfg.enable {
allow_markup = true; programs.wofi = {
insensitive = true; enable = true;
settings = {
width = "40%";
height = "30%";
show = "drun";
prompt = "Search";
allow_images = true;
allow_markup = true;
insensitive = true;
};
style = ''
${builtins.readFile ./style.css}
'';
}; };
style = ''
${builtins.readFile ./style.css}
'';
}; };
} }

View file

@ -77,6 +77,7 @@
home-manager = { home-manager = {
enable = true; enable = true;
stateVersion = "23.11"; stateVersion = "23.11";
git = { git = {
userName = "ItsDrike"; userName = "ItsDrike";
userEmail = "itsdrike@protonmail.com"; userEmail = "itsdrike@protonmail.com";
@ -85,6 +86,7 @@
key = "FA2745890B7048C0"; key = "FA2745890B7048C0";
}; };
}; };
wms.hyprland = { wms.hyprland = {
enable = true; enable = true;
monitor = [ monitor = [

View file

@ -3,6 +3,7 @@
in in
{ {
imports = [ imports = [
./programs
./git.nix ./git.nix
./wms.nix ./wms.nix
]; ];

View file

@ -0,0 +1,21 @@
{ lib, ... }: with lib; let
inherit (lib) mkEnableOption mkOption types;
in
{
imports = [
./programs
./git.nix
./wms.nix
];
options.myOptions.home-manager.programs = {
launchers = {
wofi.enable = mkEnableOption "Wofi launcher";
walker.enable = mkOption {
type = types.bool;
default = true;
description = "Enable Walker launcher.";
};
};
};
}