1

Add google-chrome option to chromium module

This commit is contained in:
2024-06-01 12:00:22 +02:00
parent 41567817ea
commit 98b1f420ab
3 changed files with 21 additions and 7 deletions

View File

@ -32,7 +32,10 @@ rec {
]; ];
modules = { modules = {
chromium.enable = true; chromium = {
enable = true;
google = false;
};
# emacs = { # emacs = {
# enable = false; # enable = false;
@ -125,6 +128,7 @@ rec {
"2" = [ "2" = [
"jetbrains-clion" "jetbrains-clion"
"code-url-handler" "code-url-handler"
"neovide"
]; ];
"3" = [ "3" = [
"obsidian" "obsidian"
@ -156,6 +160,7 @@ rec {
"obsidian" "obsidian"
"jetbrains-clion" "jetbrains-clion"
"code-url-handler" "code-url-handler"
"neovide"
]; ];
}; };
@ -378,14 +383,14 @@ rec {
appimage-run appimage-run
# decker # TODO: Build failure # decker # TODO: Build failure
google-chrome # Trash, but required for decker pdf export # google-chrome # Trash, but required for decker pdf export
(pkgs.writeShellScriptBin "chrome" "exec -a $0 ${google-chrome}/bin/google-chrome-stable $@") # (pkgs.writeShellScriptBin "chrome" "exec -a $0 ${google-chrome}/bin/google-chrome-stable $@")
cool-retro-term cool-retro-term
ventoy-full # Bootable USB for many ISOs ventoy-full # Bootable USB for many ISOs
# geekbench # geekbench
# spotify # NOTE: Uses flatpak # spotify # NOTE: Uses flatpak
neovide # neovide # NOTE: Installed in modules/neovim
sqlitebrowser # To modify tables sqlitebrowser # To modify tables
dbeaver-bin # To import/export data + diagrams dbeaver-bin # To import/export data + diagrams
@ -894,18 +899,19 @@ rec {
"com.github.tchx84.Flatseal" "com.github.tchx84.Flatseal"
"com.discordapp.Discord" "com.discordapp.Discord"
"com.spotify.Client" "com.spotify.Client"
"com.google.Chrome"
]; ];
uninstallUnmanaged = true; uninstallUnmanaged = true;
update.auto = { update.auto = {
enable = true; enable = true;
onCalendar = "weekly"; # Default value onCalendar = "daily"; # Default value: weekly
}; };
overrides = { overrides = {
global = { global = {
# TODO: Makes discord crash # NOTE: Makes discord crash
# Force Wayland by default # Force Wayland by default
# Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # Context.sockets = ["wayland" "!x11" "!fallback-x11"];
@ -916,7 +922,7 @@ rec {
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
# Force correct theme for some GTK apps # Force correct theme for some GTK apps
# GTK_THEME = "Adwaita:dark"; GTK_THEME = "Adwaita:light";
}; };
}; };
}; };

View File

@ -14,6 +14,13 @@ in {
options.modules.chromium = import ./options.nix {inherit lib mylib;}; options.modules.chromium = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; builtins.concatLists [
(optionals cfg.google [
google-chrome # Trash, but required for decker pdf export
(pkgs.writeShellScriptBin "chrome" "exec -a $0 ${google-chrome}/bin/google-chrome-stable $@")
])
];
programs.chromium = { programs.chromium = {
enable = true; enable = true;

View File

@ -6,4 +6,5 @@
with lib; with lib;
with mylib.modules; { with mylib.modules; {
enable = mkEnableOpt "Chromium"; enable = mkEnableOpt "Chromium";
google = mkEnableOpt "Google Chrome";
} }