From 8f021010c328c905634cd9bb30bd3eb8951ce93b Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Mon, 29 Apr 2024 15:03:28 +0200 Subject: [PATCH 1/2] [firefox] Remove Qwant from search --- nixos/users/tdpeuter/firefox.nix | 65 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/nixos/users/tdpeuter/firefox.nix b/nixos/users/tdpeuter/firefox.nix index ba1e9e2..962eeab 100644 --- a/nixos/users/tdpeuter/firefox.nix +++ b/nixos/users/tdpeuter/firefox.nix @@ -18,42 +18,41 @@ in { 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" ]; - }; + + profiles.tdpeuter.search= { + default = "DuckDuckGo"; + force = true; + engines = { + "Bing".metaData.hidden = true; + "eBay".metaData.hidden = true; + "Qwant".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" ]; }; }; }; From 2a4e5b5a96023875068c4a6d44f6c1c65fb2cbae Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Mon, 29 Apr 2024 15:05:07 +0200 Subject: [PATCH 2/2] [eid] Add module --- nixos/hosts/Tibo-NixFat/default.nix | 1 + nixos/modules/hardware/default.nix | 1 + nixos/modules/hardware/eid/default.nix | 18 ++++++++++++++++++ nixos/users/tdpeuter/firefox.nix | 5 +++++ 4 files changed, 25 insertions(+) create mode 100644 nixos/modules/hardware/eid/default.nix diff --git a/nixos/hosts/Tibo-NixFat/default.nix b/nixos/hosts/Tibo-NixFat/default.nix index 87186d4..257d51c 100644 --- a/nixos/hosts/Tibo-NixFat/default.nix +++ b/nixos/hosts/Tibo-NixFat/default.nix @@ -9,6 +9,7 @@ desktop.sway.enable = true; hardware = { + eid.enable = true; nvidia = { enable = true; model = "Quadro T2000"; diff --git a/nixos/modules/hardware/default.nix b/nixos/modules/hardware/default.nix index f77ad04..2d38b1e 100644 --- a/nixos/modules/hardware/default.nix +++ b/nixos/modules/hardware/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./eid ./nvidia ./yubikey ]; diff --git a/nixos/modules/hardware/eid/default.nix b/nixos/modules/hardware/eid/default.nix new file mode 100644 index 0000000..5249adf --- /dev/null +++ b/nixos/modules/hardware/eid/default.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.sisyphus.hardware.eid; +in { + options.sisyphus.hardware.eid.enable = lib.mkEnableOption "Electronic identity card (eID)"; + + config = lib.mkIf cfg.enable { + services.pcscd = { + enable = true; + plugins = [ pkgs.ccid ]; + }; + + environment.systemPackages = with pkgs; [ + eid-mw + ]; + }; +} diff --git a/nixos/users/tdpeuter/firefox.nix b/nixos/users/tdpeuter/firefox.nix index 962eeab..4c4a88c 100644 --- a/nixos/users/tdpeuter/firefox.nix +++ b/nixos/users/tdpeuter/firefox.nix @@ -20,6 +20,11 @@ in { DisableTelemetry = true; OfferToSaveLogins = false; }; + + # Support smart cards + pkcs11Modules = with pkgs-unstable; [ + eid-mw + ]; }; profiles.tdpeuter.search= {