From a85922b3b3e4a868e3836fe38d6f97cd204f60cf Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 3 Oct 2021 15:51:24 +0200 Subject: [PATCH 1/4] home: firefox: add 'refined-github' --- home/firefox/firefox/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/firefox/firefox/default.nix b/home/firefox/firefox/default.nix index 723ecc8..5d4b05e 100644 --- a/home/firefox/firefox/default.nix +++ b/home/firefox/firefox/default.nix @@ -46,6 +46,7 @@ in https-everywhere i-dont-care-about-cookies reddit-enhancement-suite + refined-github sponsorblock ublock-origin ] From 6d393fdef2ca7008b248b1a299f4469d93931f3a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 3 Oct 2021 15:53:04 +0200 Subject: [PATCH 2/4] home: firefox: re-organise module --- home/firefox/default.nix | 64 +++++++++++++++++++++++++++++--- home/firefox/firefox/default.nix | 57 ---------------------------- 2 files changed, 59 insertions(+), 62 deletions(-) delete mode 100644 home/firefox/firefox/default.nix diff --git a/home/firefox/default.nix b/home/firefox/default.nix index 3d310dc..cbcc233 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -1,5 +1,12 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.my.home.firefox; +in { + imports = [ + ./tridactyl + ]; + options.my.home.firefox = with lib; { enable = mkEnableOption "firefox configuration"; @@ -22,8 +29,55 @@ }; }; - imports = [ - ./firefox - ./tridactyl - ]; + config.programs.firefox = lib.mkIf cfg.enable { + enable = true; + + package = pkgs.firefox.override { + cfg = { + enableTridactylNative = cfg.tridactyl.enable; + }; + + extraNativeMessagingHosts = with pkgs; ([ ] + # Watch videos using mpv + ++ lib.optional cfg.ff2mpv.enable ambroisie.ff2mpv-go + ); + }; + + profiles = { + default = { + id = 0; + + settings = { + "browser.bookmarks.showMobileBookmarks" = true; # Mobile bookmarks + "browser.download.useDownloadDir" = false; # Ask for download location + "browser.in-content.dark-mode" = true; # Dark mode + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; # Disable top stories + "browser.newtabpage.activity-stream.feeds.sections" = false; + "browser.newtabpage.activity-stream.feeds.system.topstories" = false; # Disable top stories + "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket + "extensions.pocket.enabled" = false; # Disable pocket + "media.eme.enabled" = true; # Enable DRM + "media.gmp-widevinecdm.visible" = true; # Enable DRM + "media.gmp-widevinecdm.enabled" = true; # Enable DRM + "signon.autofillForms" = false; # Disable built-in form-filling + "signon.rememberSignons" = false; # Disable built-in password manager + "ui.systemUsesDarkTheme" = true; # Dark mode + }; + }; + }; + + extensions = with pkgs.nur.repos.rycee.firefox-addons; ([ + bitwarden + form-history-control + https-everywhere + i-dont-care-about-cookies + reddit-enhancement-suite + refined-github + sponsorblock + ublock-origin + ] + ++ lib.optional (cfg.tridactyl.enable) tridactyl + ++ lib.optional (cfg.ff2mpv.enable) ff2mpv + ); + }; } diff --git a/home/firefox/firefox/default.nix b/home/firefox/firefox/default.nix deleted file mode 100644 index 5d4b05e..0000000 --- a/home/firefox/firefox/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.my.home.firefox; -in -{ - config.programs.firefox = lib.mkIf cfg.enable { - enable = true; - - package = pkgs.firefox.override { - cfg = { - enableTridactylNative = cfg.tridactyl.enable; - }; - - extraNativeMessagingHosts = with pkgs; ([ ] - # Watch videos using mpv - ++ lib.optional cfg.ff2mpv.enable ambroisie.ff2mpv-go - ); - }; - - profiles = { - default = { - id = 0; - - settings = { - "browser.bookmarks.showMobileBookmarks" = true; # Mobile bookmarks - "browser.download.useDownloadDir" = false; # Ask for download location - "browser.in-content.dark-mode" = true; # Dark mode - "browser.newtabpage.activity-stream.feeds.section.topstories" = false; # Disable top stories - "browser.newtabpage.activity-stream.feeds.sections" = false; - "browser.newtabpage.activity-stream.feeds.system.topstories" = false; # Disable top stories - "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket - "extensions.pocket.enabled" = false; # Disable pocket - "media.eme.enabled" = true; # Enable DRM - "media.gmp-widevinecdm.visible" = true; # Enable DRM - "media.gmp-widevinecdm.enabled" = true; # Enable DRM - "signon.autofillForms" = false; # Disable built-in form-filling - "signon.rememberSignons" = false; # Disable built-in password manager - "ui.systemUsesDarkTheme" = true; # Dark mode - }; - }; - }; - - extensions = with pkgs.nur.repos.rycee.firefox-addons; ([ - bitwarden - form-history-control - https-everywhere - i-dont-care-about-cookies - reddit-enhancement-suite - refined-github - sponsorblock - ublock-origin - ] - ++ lib.optional (cfg.tridactyl.enable) tridactyl - ++ lib.optional (cfg.ff2mpv.enable) ff2mpv - ); - }; -} From 8569a8eb55324c36d9c97c376d451513f11fd233 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 3 Oct 2021 16:08:04 +0200 Subject: [PATCH 3/4] home: firefox: add 'reddit-comment-collapser' --- home/firefox/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/firefox/default.nix b/home/firefox/default.nix index cbcc233..b161834 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -71,6 +71,7 @@ in form-history-control https-everywhere i-dont-care-about-cookies + reddit-comment-collapser reddit-enhancement-suite refined-github sponsorblock From 323e99bbb0c9b5d60ef6dd7953c21fc19610ea81 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 8 Oct 2021 12:15:34 +0200 Subject: [PATCH 4/4] home: xdg: make gdb store history in XDG_DATA_HOME --- home/xdg/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/home/xdg/default.nix b/home/xdg/default.nix index bdeb326..1aa69ac 100644 --- a/home/xdg/default.nix +++ b/home/xdg/default.nix @@ -31,6 +31,7 @@ in # A tidy home is a tidy mind dataFile = { "bash/.keep".text = ""; + "gdb/.keep".text = ""; "tig/.keep".text = ""; }; }; @@ -39,6 +40,7 @@ in config.home.sessionVariables = with config.xdg; lib.mkIf cfg.enable { CARGO_HOME = "${dataHome}/cargo"; DOCKER_CONFIG = "${configHome}/docker"; + GDBHISTFILE = "${dataHome}/gdb/gdb_history"; HISTFILE = "${dataHome}/bash/history"; INPUTRC = "${configHome}/readline/inputrc"; LESSHISTFILE = "${dataHome}/less/history";