feat(desktop): move launcher config to homes and use home-manager modules

This commit is contained in:
Mohammad Rafiq 2025-06-14 13:59:41 +08:00
parent 6d84bd00fe
commit e6a60c257c
No known key found for this signature in database
6 changed files with 25 additions and 26 deletions

View file

@ -10,4 +10,5 @@ in
mkMerge [
(import ./browser.nix { inherit lib inputs system; })
(import ./lockscreen.nix)
(import ./launcher.nix)
]

View file

@ -0,0 +1,7 @@
{
home.sessionVariables.LAUNCHER = "fuzzel";
programs.wofi = {
style = null;
settings = { };
};
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
osConfig,
...
}:
{
config = lib.mkMerge [
(lib.mkIf (osConfig.desktop.launcher == "fuzzel") {
home.sessionVariables.LAUNCHER = "fuzzel";
programs.fuzzel = {
enable = true;
};
})
(lib.mkIf (osConfig.desktop.launcher == "wofi") {
home.sessionVariables.LAUNCHER = "wofi";
programs.wofi = {
enable = true;
style = null;
settings = { };
};
})
];
}

View file

@ -24,7 +24,6 @@ in
windowManager = lib.pantheon.mkStrOption;
terminal = lib.pantheon.mkStrOption;
notification-daemon = lib.pantheon.mkStrOption;
launcher = lib.pantheon.mkStrOption;
status-bar = lib.pantheon.mkStrOption;
media-player = lib.pantheon.mkStrOption;
enableSpotifyd = lib.mkEnableOption "";

View file

@ -0,0 +1,16 @@
{ lib, config, ... }:
let
inherit (lib) singleton mkEnableOption;
cfg = config.desktop.launcher;
in
{
options.desktop.launcher = {
fuzzel.enable = mkEnableOption "";
wofi.enable = mkEnableOption "";
};
config.home-manager.sharedModules = singleton {
programs.fuzzel.enable = cfg.fuzzel.enable;
programs.wofi.enable = cfg.wofi.enable;
};
}

View file

@ -3,10 +3,10 @@
enable = true;
browser.firefox.enable = true;
lockscreen.hyprlock.enable = true;
launcher.fuzzel.enable = true;
windowManager = "hyprland";
terminal = "ghostty";
notification-daemon = "mako";
launcher = "fuzzel";
status-bar = "waybar";
media-player = "vlc";
mainMonitor = {