feat(browser): add enable option

This commit is contained in:
2026-05-22 10:24:03 +02:00
parent 086e091add
commit 7d4e514f97
4 changed files with 23 additions and 10 deletions

View File

@@ -52,6 +52,7 @@
claude-code.enable = true;
opencode.enable = true;
};
browser.enable = true;
browser.primary = "librewolf";
cloud.hetzner.enable = true;
comms.signal.enable = true;

View File

@@ -48,6 +48,7 @@
claude-code.enable = true;
opencode.enable = true;
};
browser.enable = true;
browser.primary = "librewolf";
cloud.hetzner.enable = true;
comms.signal.enable = true;

View File

@@ -63,7 +63,11 @@
defaultWrapper = "mesa";
};
browser.primary = "firefox";
browser = {
enable = true;
primary = "firefox";
secondary = "chromium";
};
devenv.enable = true;
music.enable = true;
terminal.enable = true;
@@ -72,7 +76,6 @@
nvim.enable = true;
my.dconf.enable = true;
pandoc.enable = true;
browser.secondary = "chromium";
cloud.azure.enable = true;
comms.signal.enable = true;
comms.teams.enable = true;

View File

@@ -1,7 +1,19 @@
{ config, lib, ... }:
{
config,
lib,
...
}:
{
imports = [
./firefox.nix
./librewolf.nix
./chromium.nix
];
options.browser = {
enable = lib.mkEnableOption "browser";
primary = lib.mkOption {
type = lib.types.enum [
"firefox"
@@ -23,11 +35,7 @@
};
};
config.home.sessionVariables.BROWSER = config.browser.primary;
imports = [
./firefox.nix
./librewolf.nix
./chromium.nix
];
config = lib.mkIf config.browser.enable {
home.sessionVariables.BROWSER = config.browser.primary;
};
}