Skip to content

Commit

Permalink
zen and vivaldi browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Czichy committed Feb 19, 2025
1 parent c1c6081 commit 212cf4c
Show file tree
Hide file tree
Showing 6 changed files with 581 additions and 14 deletions.
2 changes: 2 additions & 0 deletions homes/czichy@desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ in {
services.keepassxc.enable = true;
programs = {
bitwarden.enable = true;
browsers.vivaldi.enable = true;
browsers.zen.enable = true;
ssh = {
enable = true;
sshKey.enable = false;
Expand Down
2 changes: 2 additions & 0 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ in {
# -- programs --
programs_bitwarden = importApply ./programs/bitwarden.nix {inherit localFlake;};
programs_browsers_firefox = importApply ./programs/browsers/firefox {inherit localFlake;};
programs_browsers_vivaldi = importApply ./programs/browsers/vivaldi.nix {inherit localFlake;};
programs_browsers_zen = importApply ./programs/browsers/zen.nix {inherit localFlake;};
programs_btop = importApply ./programs/btop.nix {inherit localFlake;};
programs_tmux = importApply ./programs/tmux.nix {inherit localFlake;};
programs_zellij = importApply ./programs/zellij.nix {inherit localFlake;};
Expand Down
14 changes: 0 additions & 14 deletions modules/home-manager/programs/browsers/firefox/bookmarks.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# --- parts/modules/home-manager/profiles/home-firefox/bookmarks.nix
#
# Author: czichy <[email protected]>
# URL: https://github.com/czichy/tensorfiles
# License: MIT
#
# 888 .d888 d8b 888
# 888 d88P" Y8P 888
# 888 888 888
# 888888 .d88b. 88888b. .d8888b .d88b. 888d888 888888 888 888 .d88b. .d8888b
# 888 d8P Y8b 888 "88b 88K d88""88b 888P" 888 888 888 d8P Y8b 88K
# 888 88888888 888 888 "Y8888b. 888 888 888 888 888 888 88888888 "Y8888b.
# Y88b. Y8b. 888 888 X88 Y88..88P 888 888 888 888 Y8b. X88
# "Y888 "Y8888 888 888 88888P' "Y88P" 888 888 888 888 "Y8888 88888P'
[
{
toolbar = true;
Expand Down
74 changes: 74 additions & 0 deletions modules/home-manager/programs/browsers/vivaldi.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{localFlake}: {
config,
lib,
pkgs,
inputs,
...
}:
with builtins;
with lib; let
inherit
(localFlake.lib)
mkOverrideAtHmModuleLevel
isModuleLoadedAndEnabled
mkImpermanenceEnableOption
;

cfg = config.tensorfiles.hm.programs.browsers.vivaldi;
_ = mkOverrideAtHmModuleLevel;

impermanenceCheck =
(isModuleLoadedAndEnabled config "tensorfiles.hm.system.impermanence") && cfg.impermanence.enable;
impermanence =
if impermanenceCheck
then config.tensorfiles.hm.system.impermanence
else {};
in {
options.tensorfiles.hm.programs.browsers.vivaldi = with types; {
enable = mkEnableOption ''
TODO
'';

impermanence = {
enable = mkImpermanenceEnableOption;
};
};

config = mkIf cfg.enable (mkMerge [
# |----------------------------------------------------------------------| #
{
programs.vivaldi = {
enable = _ true;
commandLineArgs = [
"--disable-gpu-driver-bug-workarounds"
"--enable-features=WaylandWindowDecorations"
"--enable-gpu-rasterization"
"--enable-zero-copy"
"--ignore-gpu-blocklist"
"--ozone-platform=wayland"
"--ozone-platform-hint=auto"
"--enable-features=WaylandWindowDecorations,CanvasOopRasterization,Vulkan,UseSkiaRenderer"
];
extensions = [
{id = "oboonakemofpalcgghocfoadofidjkkk";}
{id = "clngdbkpkpeebahjckkjfobafhncgmne";}
];
};
}
# |----------------------------------------------------------------------| #
(mkIf impermanenceCheck {
home.persistence."${impermanence.persistentRoot}${config.home.homeDirectory}" = {
directories = [
".config/vivaldi"
".local/lib/vivaldi"
];
files = [
".local/share/.vivaldi_reporting_data"
];
};
})
# |----------------------------------------------------------------------| #
]);

meta.maintainers = with localFlake.lib.maintainers; [czichy];
}
Loading

0 comments on commit 212cf4c

Please sign in to comment.