From 077b04ca73a8e6aca04cd120586c3043dbfad9dc Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 3 Apr 2024 11:02:26 +0100 Subject: [PATCH] Remove teams-for-linux, update chromium config and add package teams-for-linux seems to have support issues with new teams updates, so switching to just using chromium as my browser as that should work better Add chromium package back, also waybar rewrite and window rules, set as default browser for mimeapps Update chromium configs; Add ManagedBookmarks and alphabetise the other config options. Add ublock-origin, simplelogin and catppuccin theme plugins --- home/hyprland/default.nix | 5 +- home/waybar/default.nix | 3 +- hosts/Ronin/configuration.nix | 7 +-- hosts/Ronin/home.nix | 2 +- hosts/Scorch/configuration.nix | 7 +-- system/chromium.nix | 104 +++++++++++++++++++++++++++++---- system/hyprland.nix | 10 ++-- 7 files changed, 105 insertions(+), 33 deletions(-) diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 3172a660..0c9e08e1 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -19,7 +19,6 @@ ../avizo/default.nix ../alacritty/default.nix ../emacs/default.nix - ../nyxt/default.nix ../obs/default.nix ../cava/default.nix ]; @@ -197,8 +196,8 @@ ++ (lib.lists.forEach layers ignorealpha); windowrule = [ # Workspace binds - "workspace 2, firefox" - "workspace 4, (com.obsproject.Studio|WebCord|signal|teams-for-linux)" + "workspace 2, (chromium-browser|firefox)" + "workspace 4, (com.obsproject.Studio|WebCord|signal)" "workspace 5 silent, (steam|org.prismlauncher.PrismLauncher)" # Keep silent to avoid popups taking focus "workspace 6, (x2goclient|Nxplayer.bin)" diff --git a/home/waybar/default.nix b/home/waybar/default.nix index 8ca0e3eb..250bf414 100644 --- a/home/waybar/default.nix +++ b/home/waybar/default.nix @@ -48,12 +48,13 @@ "Nyxt - (.*)" = "󰀹 $1"; "Mozilla Firefox" = "󰈹 $1"; "(.*) — Mozilla Firefox" = "󰈹 $1"; + "(.*) - Chromium" = "󰊯 $1"; "((?:.*)WebCord.*)" = "󰙯 $1"; "(Signal.*)" = "󰭹 $1"; "(WhatsApp for Linux.*)" = "󰖣 $1"; "([Ss]team)" = "󰓓 $1"; "(Prism Launcher.*)" = "󰍳 Minecraft ($1)"; - "Microsoft Teams(?: classic)?(?: - )?(.*)(?: \| Microsoft Teams)?" = "󰊻 $1"; + "(.*) Microsoft Teams(?: classic)" = "$1 󰊻 "; "(X2Go Client)" = "󰢹 $1"; "(NoMachine|Nxplayer.bin) (.*)" = "󰢹 $1 $2"; }; diff --git a/hosts/Ronin/configuration.nix b/hosts/Ronin/configuration.nix index 79362f0d..2f71d03d 100644 --- a/hosts/Ronin/configuration.nix +++ b/hosts/Ronin/configuration.nix @@ -10,12 +10,7 @@ etc."ppp/options".text = '' ipcp-accept-remote ''; - systemPackages = with pkgs; [ - openfortivpn - samba - teams-for-linux - nomachine-client - ]; + systemPackages = with pkgs; [openfortivpn samba nomachine-client]; }; services.ollama.enable = true; } diff --git a/hosts/Ronin/home.nix b/hosts/Ronin/home.nix index d5697eca..86243db1 100644 --- a/hosts/Ronin/home.nix +++ b/hosts/Ronin/home.nix @@ -2,7 +2,7 @@ imports = [../Scorch/home.nix]; home.packages = [(pkgs.writeShellScriptBin "ukaea-vpn-connect" "sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf}")]; wayland.windowManager.hyprland.settings = { - workspace = ["3, monitor:eDP-1, default:true"]; + workspace = ["2, monitor:eDP-1, default:true"]; monitor = ["eDP-1,1920x1080,2560x576,1.20"]; }; } diff --git a/hosts/Scorch/configuration.nix b/hosts/Scorch/configuration.nix index 93ffcbd8..3f18814d 100644 --- a/hosts/Scorch/configuration.nix +++ b/hosts/Scorch/configuration.nix @@ -12,12 +12,7 @@ etc."ppp/options".text = '' ipcp-accept-remote ''; - systemPackages = with pkgs; [ - openfortivpn - samba - teams-for-linux - nomachine-client - ]; + systemPackages = with pkgs; [openfortivpn samba nomachine-client]; }; services.ollama.enable = true; } diff --git a/system/chromium.nix b/system/chromium.nix index 548d9818..b089db39 100644 --- a/system/chromium.nix +++ b/system/chromium.nix @@ -1,10 +1,21 @@ -{...}: { +{pkgs, ...}: { + environment.systemPackages = [pkgs.chromium]; programs.chromium = { enable = true; defaultSearchProviderEnabled = true; defaultSearchProviderSearchURL = "https://search.atlas.engineer/searxng/search?q={searchTerms}"; defaultSearchProviderSuggestURL = "https://duckduckgo.com/?q={searchTerms}"; + extensions = [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin + "dphilobhebphkdjbpfohgikllaljmgbn" # simplelogin + "bkkmolkhemgaeaeggcmfbghljjjoofoh" # catppuccin mocha theme + ]; extraOpts = { + "AllowDinosaurEasterEgg" = true; + "AllowSystemNotifications" = true; + "AutoFillEnabled" = false; + "BookmarkBarEnabled" = true; + "BrowserLabsEnabled" = false; "BrowserSignin" = 0; "ClearBrowsingDataOnExitList" = [ "browsing_history" @@ -18,18 +29,91 @@ ]; "DefaultBrowserSettingEnabled" = false; "DeviceAutoUpdateDisabled" = true; - "SyncDisabled" = true; + "HomepageIsNewTabPage" = false; "PasswordManagerEnabled" = false; + "RestoreOnStartup" = 5; + "ShoppingListEnabled" = false; + "ShowHomeButton" = false; "SpellcheckEnabled" = true; "SpellcheckLanguage" = ["en-GB"]; - "AllowDinosaurEasterEgg" = true; - "AllowSystemNotifications" = true; - "AutoFillEnabled" = false; - "BrowserLabsEnabled" = false; - "BookmarkBarEnabled" = false; - "ShowHomeButton" = false; - "HomepageIsNewTabPage" = false; - "RestoreOnStartup" = 5; + "SpellCheckServiceEnabled" = false; + "SyncDisabled" = true; + # Bookmarks + "ManagedBookmarks" = [ + {toplevel_name = "Managed Bookmarks";} + { + name = "Messaging"; + children = [ + { + name = "WhatsApp Web"; + url = "https://web.whatsapp.com/"; + } + { + name = "Discord"; + url = "https://discord.com/login"; # TODO update to proper webapp URL + } + { + name = "Microsoft Teams"; + url = "https://teams.microsoft.com"; + } + ]; + } + { + name = "Server"; + children = [ + { + name = "Home Page"; + url = "https://xenia.me.uk"; + } + { + name = "Forgejo"; + url = "https://git.xenia.me.uk"; + } + { + name = "Grafana Dashboard"; + url = "https://grafana.xenia.me.uk"; + } + ]; + } + { + name = "Documentation"; + children = [ + { + name = "NixOS and Flakes"; + url = "https://nixos-and-flakes.thiscute.world/"; + } + { + name = "Home Manager Configuration Options"; + url = "https://nix-community.github.io/home-manager/options.xhtml"; + } + { + name = "Home Manager Option Search"; + url = "https://mipmip.github.io/home-manager-option-search/"; + } + { + name = "Mozilla Policy Templates"; + url = "https://mozilla.github.io/policy-templates/"; + } + { + name = "Chrome Enterprise Policy List"; + url = "https://chromeenterprise.google/policies/"; + } + ]; + } + { + name = "Awesome Repos"; + children = [ + { + name = "Emacs"; + url = "https://github.com/emacs-tw/awesome-emacs"; + } + { + name = "Hyprland"; + url = "https://github.com/hyprland-community/awesome-hyprland"; + } + ]; + } + ]; }; }; } diff --git a/system/hyprland.nix b/system/hyprland.nix index 61f6cfc5..404cdc60 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -3,7 +3,7 @@ pkgs, ... }: { - imports = [./desktop.nix ./firefox.nix ./chromium.nix]; + imports = [./desktop.nix ./chromium.nix]; nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland"; environment = { sessionVariables = { @@ -51,9 +51,7 @@ xdg.portal.enable = true; xdg.mime = let emacs = ["emacsclient.desktop" "emacs.desktop"]; - # TODO add nyxt back to browser when I can fix opening - # links in existing sessions - browser = ["firefox.desktop"]; # nyxt.desktop + browser = ["chromium.desktop"]; applications = { "inode/directory" = emacs; "inode/symlink" = emacs; @@ -109,11 +107,11 @@ "x-scheme-handler/about" = browser; "x-scheme-handler/chrome" = browser; "x-scheme-handler/webcal" = browser; + "x-scheme-handler/unknown" = emacs; # "x-scheme-handler/ms-word" = emacs; # "x-scheme-handler/ms-powerpoint" = emacs; # "x-scheme-handler/ms-excel" = emacs; - "x-scheme-handler/unknown" = emacs; - "x-scheme-handler/msteams" = ["teams-for-linux.desktop"]; + # "x-scheme-handler/msteams" = ["teams-for-linux.desktop"]; }; in { enable = true;