From 4166a54600408f3b7fab2d1a7cca45d8b7687dd0 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Fri, 20 Oct 2023 20:10:35 +0200 Subject: [PATCH] [firefox] Move into user config --- nixos/hosts/Tibo-NixFat/default.nix | 1 + nixos/modules-old/apps/default.nix | 5 -- nixos/modules-old/apps/firefox/default.nix | 56 -------------------- nixos/modules-old/default.nix | 11 ---- nixos/modules/users/tdpeuter/default.nix | 11 ++-- nixos/modules/users/tdpeuter/firefox.nix | 60 ++++++++++++++++++++++ 6 files changed, 69 insertions(+), 75 deletions(-) delete mode 100644 nixos/modules-old/apps/default.nix delete mode 100644 nixos/modules-old/apps/firefox/default.nix create mode 100644 nixos/modules/users/tdpeuter/firefox.nix diff --git a/nixos/hosts/Tibo-NixFat/default.nix b/nixos/hosts/Tibo-NixFat/default.nix index 4e7467f..7dec708 100644 --- a/nixos/hosts/Tibo-NixFat/default.nix +++ b/nixos/hosts/Tibo-NixFat/default.nix @@ -46,6 +46,7 @@ environment.systemPackages = with pkgs; [ git vim + w3m wget zenith-nvidia ]; diff --git a/nixos/modules-old/apps/default.nix b/nixos/modules-old/apps/default.nix deleted file mode 100644 index 3887b25..0000000 --- a/nixos/modules-old/apps/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ./firefox - ]; -} diff --git a/nixos/modules-old/apps/firefox/default.nix b/nixos/modules-old/apps/firefox/default.nix deleted file mode 100644 index 56e0eb2..0000000 --- a/nixos/modules-old/apps/firefox/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ inputs, lib, config, pkgs, ... }: - -{ - home-manager.users.tdpeuter.programs.firefox = { - enable = true; - package = pkgs.firefox.override { - cfg = { - enableTridactylNative = true; - speechSynthesisSupport = true; # Allow Text-to-speech in e.g. Discord - }; - extraPolicies = { - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - ExtensionSettings = {}; - OfferToSaveLogins = false; - }; - }; - profiles.tdpeuter = { - search = { - default = "DuckDuckGo"; - force = true; - engines = { - "Bing".metaData.hidden = true; - "eBay".metaData.hidden = true; - - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { name = "type"; value = "packages"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; - }; - "GitHub" = { - urls = [{ - template = "https://github.com/search"; - params = [ - { name = "q"; value = "{searchTerms}"; } - { name = "type"; value = "repositories"; } - ]; - }]; - - icon = "${pkgs.icosystem}/share/icons/icosystem/scalable/apps/github-mark.svg"; - definedAliases = [ "@gh" ]; - }; - }; - }; - }; - }; -} - diff --git a/nixos/modules-old/default.nix b/nixos/modules-old/default.nix index 8073084..ec66e24 100644 --- a/nixos/modules-old/default.nix +++ b/nixos/modules-old/default.nix @@ -1,10 +1,6 @@ { inputs, lib, config, pkgs, ... }: { - imports = [ - ./apps - ]; - # Nix Flakes nix.package = pkgs.nixFlakes; nix.extraOptions = '' @@ -13,13 +9,6 @@ keep-derivations = true ''; - fonts.fonts = with pkgs; [ - corefonts # Calibri for Uni - vistafonts - - letter # Personal font - ]; - # Select internationalisation properties. i18n.defaultLocale = "en_GB.UTF-8"; console = { diff --git a/nixos/modules/users/tdpeuter/default.nix b/nixos/modules/users/tdpeuter/default.nix index 2866f11..0be8d05 100644 --- a/nixos/modules/users/tdpeuter/default.nix +++ b/nixos/modules/users/tdpeuter/default.nix @@ -8,7 +8,8 @@ let in { imports = [ ./dotfiles.nix - ./mail.nix + ./firefox.nix # Enables Firefox without setting options + ./mail.nix # Enables Thunderbird without setting options ./secrets.nix ]; @@ -28,10 +29,13 @@ in { }; fonts.fonts = with pkgs; [ - font-awesome # Dependency of zsh + corefonts # Calibri for Uni font-awesome_5 # Dependency of Vifm config - noto-fonts # Dependency of Zellij config + font-awesome # Dependency of zsh + letter # Personal font noto-fonts-cjk # Dependency of Zellij config + noto-fonts # Dependency of Zellij config + vistafonts # Microsoft fonts ]; home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable { @@ -50,6 +54,7 @@ in { duf # Df alternative fzf glow # Terminal Markdown renderer + icosystem # Personal icon theme jellyfin-media-player kitty libreoffice-fresh diff --git a/nixos/modules/users/tdpeuter/firefox.nix b/nixos/modules/users/tdpeuter/firefox.nix new file mode 100644 index 0000000..1a43fe6 --- /dev/null +++ b/nixos/modules/users/tdpeuter/firefox.nix @@ -0,0 +1,60 @@ +{ config, lib, pkgs, pkgs-unstable, ... }: + +let + cfg = config.sisyphus.users.tdpeuter; + user = config.users.users.tdpeuter.name; +in { + config = lib.mkIf cfg.enable { + home-manager.users.tdpeuter.programs.firefox = lib.mkIf config.sisyphus.programs.home-manager.enable { + enable = true; + package = pkgs.firefox.override { + cfg = { + enableTridactylNative = true; + speechSynthesisSupport = true; # Allow Text-to-speech in e.g. Discord + }; + extraPolicies = { + DisableFirefoxStudies = true; + DisablePocket = true; + DisableTelemetry = true; + ExtensionSettings = {}; + OfferToSaveLogins = false; + }; + }; + profiles.tdpeuter = { + search = { + default = "DuckDuckGo"; + force = true; + engines = { + "Bing".metaData.hidden = true; + "eBay".metaData.hidden = true; + + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { name = "type"; value = "packages"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + "GitHub" = { + urls = [{ + template = "https://github.com/search"; + params = [ + { name = "q"; value = "{searchTerms}"; } + { name = "type"; value = "repositories"; } + ]; + }]; + + icon = "${pkgs.icosystem}/share/icons/icosystem/scalable/apps/github-mark.svg"; + definedAliases = [ "@gh" ]; + }; + }; + }; + }; + }; + }; +}