refactor(homeModules/desktop): move browser config to module

This commit is contained in:
Mohammad Rafiq 2025-05-20 12:11:45 +08:00
parent a1001ddb4c
commit 26c3c43aee
No known key found for this signature in database
4 changed files with 10 additions and 18 deletions

View file

@ -1,10 +1,6 @@
{ config, pkgs, osConfig, ... }:
{
imports = [
./desktop.nix
];
cli.shell = "zsh";
cli.editor = "nvf";
cli.file-browser = "yazi";
@ -12,6 +8,7 @@
cli.git.email = "rafiq@rrv.sh";
cli.git.defaultBranch = "prime";
desktop.windowManager = "hyprland";
desktop.browser = "firefox";
home.shellAliases.v = "nvim";
home.shellAliases = {
@ -27,8 +24,11 @@
fzf
devenv
pantheon.rebuild
kitty
];
home.sessionVariables = { TERMINAL = "kitty"; };
programs.direnv = {
enable = true;
nix-direnv.enable = true;

View file

@ -1,13 +0,0 @@
{pkgs,...}:
{
imports = [
./desktop/firefox.nix
];
home.packages = with pkgs; [
kitty
];
home.sessionVariables = {
TERMINAL = "kitty";
BROWSER = "firefox";
};
}

View file

@ -1,8 +1,12 @@
{ config, lib, ... }:
{
config = lib.mkIf (config.desktop.browser == "firefox") {
home.persistence."/persist/home/rafiq".directories = [ ".mozilla/firefox" ];
home.sessionVariables.BROWSER = "firefox";
programs.firefox = {
enable = true;
profiles.rafiq.id = 0;
profiles.test.id = 1;
};
home.persistence."/persist/home/rafiq".directories = [ ".mozilla/firefox" ];
};
}

View file

@ -2,6 +2,7 @@
{
options.desktop = {
windowManager = lib.pantheon.mkStrOption;
browser = lib.pantheon.mkStrOption;
};