From daf6429e64b9217fbef7768db7107a1dabfde49f Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:16:18 -0500 Subject: [PATCH 1/5] feat: Add Zed editor config --- flake.lock | 24 ++++++++++++------------ homes/desktop.nix | 2 ++ programs/zed.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 12 deletions(-) create mode 100644 programs/zed.nix diff --git a/flake.lock b/flake.lock index d8bc002..6a9e0b9 100644 --- a/flake.lock +++ b/flake.lock @@ -73,11 +73,11 @@ ] }, "locked": { - "lastModified": 1739757849, - "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", + "lastModified": 1743808813, + "narHash": "sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT+PpMao6FbLJSr0=", "owner": "nix-community", "repo": "home-manager", - "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", + "rev": "a9f8b3db211b4609ddd83683f9db89796c7f6ac6", "type": "github" }, "original": { @@ -94,11 +94,11 @@ ] }, "locked": { - "lastModified": 1741126078, - "narHash": "sha256-ng0a4cIq3c9E3iGKomlwqKzVYs2RLOzQho2U1Mc2sqU=", + "lastModified": 1743127615, + "narHash": "sha256-+sMGqywrSr50BGMLMeY789mSrzjkoxZiu61eWjYS/8o=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "c172f50b55b087f8e7801631de977461603bb976", + "rev": "fc843893cecc1838a59713ee3e50e9e7edc6207c", "type": "github" }, "original": { @@ -110,11 +110,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741838297, - "narHash": "sha256-0etyrY6jOzFwVILODzMc43MTtUanxzFSaqe3kVLvew4=", + "lastModified": 1743891346, + "narHash": "sha256-QNxnxIi6PJEnwJp7ZXUpxX4/z/cmRJGeIOkIYfYh/8E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "80b53fdb4f883238807ced86db41be809d60f3b5", + "rev": "f27c6099cec4fe9b67c7fbc51d8324dcb4b52694", "type": "github" }, "original": { @@ -126,11 +126,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1741865919, - "narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", + "lastModified": 1743938762, + "narHash": "sha256-UgFYn8sGv9B8PoFpUfCa43CjMZBl1x/ShQhRDHBFQdI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a", + "rev": "74a40410369a1c35ee09b8a1abee6f4acbedc059", "type": "github" }, "original": { diff --git a/homes/desktop.nix b/homes/desktop.nix index 11bb398..c8ba41c 100644 --- a/homes/desktop.nix +++ b/homes/desktop.nix @@ -4,11 +4,13 @@ let inherit pkgs; inherit pkgs-unstable; }; + zed-config = import ./../programs/zed.nix; in { home = { packages = packages.desktop; shellAliases = { code = "codium"; }; }; + programs = { zed-editor = zed-config; }; services = { gpg-agent = { enable = true; diff --git a/programs/zed.nix b/programs/zed.nix new file mode 100644 index 0000000..e3cbb0f --- /dev/null +++ b/programs/zed.nix @@ -0,0 +1,46 @@ +{ + enable = true; + extensions = [ + "basher" + "clojure" + "cspell" + "dockerfile" + "earthfile" + "git-firefly" + "html" + "julia" + "latex" + "macos-classic" + "nix" + "toml" + "xml" + ]; + userSettings = { + assistant = { + default_model = { + provider = "zed.dev"; + model = "claude-3-5-sonnet-latest"; + }; + version = "2"; + }; + buffer_font_family = "FiraCode Nerd Font"; + buffer_font_size = 11; + features = { edit_prediction_provider = "zed"; }; + languages = { + Nix = { formatter = { external = { command = "nixfmt"; }; }; }; + }; + preview_tabs = { enabled = false; }; + ssh_connections = [{ + host = "anderson"; + projects = [{ paths = [ "/var/docker" ]; }]; + }]; + show_edit_predictions = false; + terminal = { + font_family = "MesloLGS NF"; + font_size = 10; + }; + theme = "macOS Classic Dark2"; + ui_font_size = 16; + wrap_guides = [ 80 92 120 ]; + }; +} From 99b45f53e7cef52966335dcf10fd54501caab252 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:32:39 -0500 Subject: [PATCH 2/5] feat: Add FreeTube config --- homes/desktop.nix | 6 +++- programs/freetube.nix | 66 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 programs/freetube.nix diff --git a/homes/desktop.nix b/homes/desktop.nix index c8ba41c..8db9989 100644 --- a/homes/desktop.nix +++ b/homes/desktop.nix @@ -4,13 +4,17 @@ let inherit pkgs; inherit pkgs-unstable; }; + freetube-config = import ./../programs/freetube.nix; zed-config = import ./../programs/zed.nix; in { home = { packages = packages.desktop; shellAliases = { code = "codium"; }; }; - programs = { zed-editor = zed-config; }; + programs = { + freetube = freetube-config; + zed-editor = zed-config; + }; services = { gpg-agent = { enable = true; diff --git a/programs/freetube.nix b/programs/freetube.nix new file mode 100644 index 0000000..c3e5c90 --- /dev/null +++ b/programs/freetube.nix @@ -0,0 +1,66 @@ +{ + enable = true; + settings = { + allSettingsSectionsExpandedByDefault = false; + autoplayVideos = true; + backendFallback = false; + blurThumbnails = false; + checkForBlogPosts = false; + checkForUpdates = true; + commentAutoLoadEnabled = false; + defaultVideoFormat = "dash"; + defaultViewingMode = "theatre"; + enableSearchSuggestions = false; + expandSideBar = false; + hideActiveSubscriptions = true; + hideChannelCommunity = true; + hideChannelSubscriptions = true; + hideCommentLikes = true; + hideComments = false; + hideHeaderLogo = true; + hideLabelsSideBar = true; + hidePlaylists = false; + hidePopularVideos = true; + hideRecommendedVideos = true; + hideSubscriptionsCommunity = true; + hideSubscriptionsLive = false; + hideSubscriptionsShorts = false; + hideSubscriptionsVideos = false; + hideTrendingVideos = true; + hideUpcomingPremieres = true; + hideVideoLikesAndDislikes = true; + hideVideoViews = true; + listType = "list"; + playNextVideo = false; + rememberHistory = true; + saveWatchedProgress = true; + settingsSectionSortEnabled = false; + showDistractionFreeTitles = true; + sponsorBlockFiller = { + color = "Amber"; + skip = "showInSeekBar"; + }; + sponsorBlockIntro = { + color = "Orange"; + skip = "showInSeekBar"; + }; + sponsorBlockMusicOffTopic = { + color = "Lime"; + skip = "showInSeekBar"; + }; + sponsorBlockOutro = { + color = "Orange"; + skip = "showInSeekBar"; + }; + sponsorBlockRecap = { + color = "DeepOrange"; + skip = "showInSeekBar"; + }; + useDeArrowThumbnails = false; + useDeArrowTitles = true; + useRssFeeds = true; + useSponsorBlock = true; + userPlaylistSortOrder = "date_added_ascending"; + videoVolumeMouseScroll = true; + }; +} From 4035d65d1cd0aba53fd469a3310743ac0e0951c5 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:47:41 -0500 Subject: [PATCH 3/5] feat!: Remove FreeTube config On second thought, adding a FreeTube config to Home Manager would be a nightmare. First, FreeTube can't be installed on aarch64-darwin. Most packages don't have the feature that Firefox does where you can actually set the package to `null` and have the distro manage the install for you. I could copy the module over from Home Manager and remove the package requirement. That would work for darwin systems, but that will not work for Flatpak, because Flatpak apps don't use the XDG file layouts. I *could* choose to write into the ~/.var directory version for Flatpak with my custom module, but that strikes me as a super brittle method. Ideally, I will be able to figure out a gpodder-like sync function for Freetube, but Home Manager is not a proper solution for this. --- homes/desktop.nix | 6 +--- programs/freetube.nix | 66 ------------------------------------------- 2 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 programs/freetube.nix diff --git a/homes/desktop.nix b/homes/desktop.nix index 8db9989..c8ba41c 100644 --- a/homes/desktop.nix +++ b/homes/desktop.nix @@ -4,17 +4,13 @@ let inherit pkgs; inherit pkgs-unstable; }; - freetube-config = import ./../programs/freetube.nix; zed-config = import ./../programs/zed.nix; in { home = { packages = packages.desktop; shellAliases = { code = "codium"; }; }; - programs = { - freetube = freetube-config; - zed-editor = zed-config; - }; + programs = { zed-editor = zed-config; }; services = { gpg-agent = { enable = true; diff --git a/programs/freetube.nix b/programs/freetube.nix deleted file mode 100644 index c3e5c90..0000000 --- a/programs/freetube.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - enable = true; - settings = { - allSettingsSectionsExpandedByDefault = false; - autoplayVideos = true; - backendFallback = false; - blurThumbnails = false; - checkForBlogPosts = false; - checkForUpdates = true; - commentAutoLoadEnabled = false; - defaultVideoFormat = "dash"; - defaultViewingMode = "theatre"; - enableSearchSuggestions = false; - expandSideBar = false; - hideActiveSubscriptions = true; - hideChannelCommunity = true; - hideChannelSubscriptions = true; - hideCommentLikes = true; - hideComments = false; - hideHeaderLogo = true; - hideLabelsSideBar = true; - hidePlaylists = false; - hidePopularVideos = true; - hideRecommendedVideos = true; - hideSubscriptionsCommunity = true; - hideSubscriptionsLive = false; - hideSubscriptionsShorts = false; - hideSubscriptionsVideos = false; - hideTrendingVideos = true; - hideUpcomingPremieres = true; - hideVideoLikesAndDislikes = true; - hideVideoViews = true; - listType = "list"; - playNextVideo = false; - rememberHistory = true; - saveWatchedProgress = true; - settingsSectionSortEnabled = false; - showDistractionFreeTitles = true; - sponsorBlockFiller = { - color = "Amber"; - skip = "showInSeekBar"; - }; - sponsorBlockIntro = { - color = "Orange"; - skip = "showInSeekBar"; - }; - sponsorBlockMusicOffTopic = { - color = "Lime"; - skip = "showInSeekBar"; - }; - sponsorBlockOutro = { - color = "Orange"; - skip = "showInSeekBar"; - }; - sponsorBlockRecap = { - color = "DeepOrange"; - skip = "showInSeekBar"; - }; - useDeArrowThumbnails = false; - useDeArrowTitles = true; - useRssFeeds = true; - useSponsorBlock = true; - userPlaylistSortOrder = "date_added_ascending"; - videoVolumeMouseScroll = true; - }; -} From 2122afb1bf8a5ab61b2b531d26267c794040d69e Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 8 Apr 2025 22:52:15 -0500 Subject: [PATCH 4/5] refactor: Create function that generates homeManagerConfiguration --- flake.nix | 108 ++++++++++++++---------------------------------------- 1 file changed, 27 insertions(+), 81 deletions(-) diff --git a/flake.nix b/flake.nix index 5dc90ed..122a601 100644 --- a/flake.nix +++ b/flake.nix @@ -19,100 +19,46 @@ }; }; - outputs = { self, nix-darwin, nixpkgs, nixpkgs-unstable, home-manager, agenix - , ... }: { - homeConfigurations = { - "millironx@corianne" = home-manager.lib.homeManagerConfiguration { + outputs = + { self, nix-darwin, nixpkgs, nixpkgs-unstable, home-manager, agenix, ... }: + let + mkHomeConfiguration = { hostname, arch ? "x86_64", os ? "linux" + , desktop ? false, extraModules ? [ ] }: + let + system = "${arch}-${os}"; pkgs = import nixpkgs { - system = "aarch64-darwin"; + inherit system; config.allowUnfree = true; }; - - # Specify your home configuration modules here, for example, - # the path to your home.nix. - modules = [ - ./homes/common.nix - ./homes/darwin.nix - ./homes/desktop.nix - ./homes/corianne.nix - agenix.homeManagerModules.default - ]; - - # Optionally use extraSpecialArgs - # to pass through arguments to home.nix - extraSpecialArgs = { - pkgs-unstable = import nixpkgs-unstable { - system = "aarch64-darwin"; - config.allowUnfree = true; - }; - }; - }; - - "millironx@anderson" = let - system = "x86_64-linux"; - config = { allowUnfree = true; }; - pkgs = import nixpkgs { + pkgs-unstable = import nixpkgs-unstable { inherit system; - inherit config; - }; - pkg-unstable = import nixpkgs-unstable { - inherit system; - inherit config; + config.allowUnfree = true; }; in home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ ./homes/common.nix - ./homes/linux.nix - ./homes/anderson.nix + ./homes/${os}.nix + ./homes/${hostname}.nix agenix.homeManagerModules.default - ]; - extraSpecialArgs = { inherit pkg-unstable; }; + ] ++ (if desktop then [ ./homes/desktop.nix ] else [ ]) + ++ extraModules; + extraSpecialArgs = { inherit pkgs-unstable; }; + }; + in { + homeConfigurations = { + "millironx@corianne" = mkHomeConfiguration { + hostname = "corianne"; + arch = "aarch64"; + os = "darwin"; + desktop = true; }; - "millironx@bosephus" = let - system = "x86_64-linux"; - config = { allowUnfree = true; }; - pkgs = import nixpkgs { - inherit system; - inherit config; - }; - pkg-unstable = import nixpkgs-unstable { - inherit system; - inherit config; - }; - in home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ - ./homes/common.nix - ./homes/linux.nix - ./homes/bosephus.nix - agenix.homeManagerModules.default - ]; - extraSpecialArgs = { inherit pkg-unstable; }; - }; + "millironx@anderson" = mkHomeConfiguration { hostname = "anderson"; }; - "tchristensen@beocat" = let - system = "x86_64-linux"; - config = { allowUnfree = true; }; - pkgs = import nixpkgs { - inherit system; - inherit config; - }; - pkg-unstable = import nixpkgs-unstable { - inherit system; - inherit config; - }; - in home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ - ./homes/common.nix - ./homes/linux.nix - ./homes/beocat.nix - agenix.homeManagerModules.default - ]; - extraSpecialArgs = { inherit pkg-unstable; }; - }; + "millironx@bosephus" = mkHomeConfiguration { hostname = "bosephus"; }; + + "tchristensen@beocat" = mkHomeConfiguration { hostname = "beocat"; }; }; darwinConfigurations."corianne" = nix-darwin.lib.darwinSystem { From b35ce8ea00ef363f4cc8c052f64b0333bafa9c13 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 8 Apr 2025 22:57:16 -0500 Subject: [PATCH 5/5] feat: Add Firefox config --- flake.lock | 90 +++++++++++++- flake.nix | 21 +++- homes/desktop.nix | 12 +- programs/firefox.nix | 276 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 393 insertions(+), 6 deletions(-) create mode 100644 programs/firefox.nix diff --git a/flake.lock b/flake.lock index 6a9e0b9..e434794 100644 --- a/flake.lock +++ b/flake.lock @@ -45,6 +45,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -140,13 +161,59 @@ "type": "github" } }, + "nur": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1744170471, + "narHash": "sha256-IOo5/Y7SagmCLFAVG6SGcre4XtRlJDz/61BaqBQCrQQ=", + "owner": "nix-community", + "repo": "NUR", + "rev": "8f5c2432968936b78f9e42ec0ed82167bd1a3bd7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs-unstable": "nixpkgs-unstable", + "nur": "nur", + "rycee-nurpkgs": "rycee-nurpkgs" + } + }, + "rycee-nurpkgs": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "dir": "pkgs/firefox-addons", + "lastModified": 1744140214, + "narHash": "sha256-iZIA22PlVXMbBA3Df/SmbVj45CiikSofrSCwVT+xNYU=", + "owner": "rycee", + "repo": "nur-expressions", + "rev": "8d9af93d292ef141354d32a91dca041ce324b109", + "type": "gitlab" + }, + "original": { + "dir": "pkgs/firefox-addons", + "owner": "rycee", + "repo": "nur-expressions", + "type": "gitlab" } }, "systems": { @@ -163,6 +230,27 @@ "repo": "default", "type": "github" } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 122a601..2bc24ca 100644 --- a/flake.nix +++ b/flake.nix @@ -17,10 +17,18 @@ url = "github:LnL7/nix-darwin/nix-darwin-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + rycee-nurpkgs = { + url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = - { self, nix-darwin, nixpkgs, nixpkgs-unstable, home-manager, agenix, ... }: + outputs = { self, nix-darwin, nixpkgs, nixpkgs-unstable, home-manager, agenix + , rycee-nurpkgs, nur, ... }: let mkHomeConfiguration = { hostname, arch ? "x86_64", os ? "linux" , desktop ? false, extraModules ? [ ] }: @@ -29,11 +37,14 @@ pkgs = import nixpkgs { inherit system; config.allowUnfree = true; + overlays = [ nur.overlays.default ]; }; pkgs-unstable = import nixpkgs-unstable { inherit system; config.allowUnfree = true; }; + firefox-addons = pkgs.nur.repos.rycee.firefox-addons; + inherit (rycee-nurpkgs.lib.${system}) buildFirefoxXpiAddon; in home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ @@ -43,7 +54,11 @@ agenix.homeManagerModules.default ] ++ (if desktop then [ ./homes/desktop.nix ] else [ ]) ++ extraModules; - extraSpecialArgs = { inherit pkgs-unstable; }; + extraSpecialArgs = { + inherit pkgs-unstable; + inherit firefox-addons; + inherit buildFirefoxXpiAddon; + }; }; in { homeConfigurations = { diff --git a/homes/desktop.nix b/homes/desktop.nix index c8ba41c..9a70e05 100644 --- a/homes/desktop.nix +++ b/homes/desktop.nix @@ -1,16 +1,24 @@ -{ config, lib, pkgs, pkgs-unstable, ... }: +{ config, lib, pkgs, pkgs-unstable, firefox-addons, buildFirefoxXpiAddon, ... }: let packages = import ./../pkgs.nix { inherit pkgs; inherit pkgs-unstable; }; + firefox-config = import ./../programs/firefox.nix; zed-config = import ./../programs/zed.nix; in { home = { packages = packages.desktop; shellAliases = { code = "codium"; }; }; - programs = { zed-editor = zed-config; }; + programs = { + firefox = firefox-config { + inherit firefox-addons; + inherit buildFirefoxXpiAddon; + inherit lib; + }; + zed-editor = zed-config; + }; services = { gpg-agent = { enable = true; diff --git a/programs/firefox.nix b/programs/firefox.nix new file mode 100644 index 0000000..6fda45e --- /dev/null +++ b/programs/firefox.nix @@ -0,0 +1,276 @@ +{ firefox-addons, buildFirefoxXpiAddon, lib }: { + enable = true; + package = + null; # Use native package manager/Homebrew b/c there are fewer breakages + profiles = { + "millironx-default" = { + id = 0; + containers = { + "Personal" = { + id = 1; + color = "blue"; + icon = "fingerprint"; + }; + "Administrator" = { + id = 2; + color = "yellow"; + icon = "briefcase"; + }; + "Kansas State CVM" = { + id = 3; + color = "purple"; + icon = "pet"; + }; + "Kansas State" = { + id = 4; + color = "pink"; + icon = "fruit"; + }; + "Bovine Club" = { + id = 5; + color = "turquoise"; + icon = "food"; + }; + "CVF" = { + id = 6; + color = "red"; + icon = "food"; + }; + "Swine Club" = { + id = 7; + color = "green"; + icon = "food"; + }; + "Therio Club" = { + id = 8; + color = "orange"; + icon = "food"; + }; + }; + containersForce = true; + extensions = with firefox-addons; [ + bitwarden + multi-account-containers + floccus + libredirect + old-reddit-redirect + plasma-integration + pwas-for-firefox + ublock-origin + web-archives + zotero-connector + (buildFirefoxXpiAddon rec { + pname = "always_in_container"; + version = "1.0.7"; + addonId = "{a1e9543e-5f73-4763-b376-04e53fd12cbd}"; + url = + "https://addons.mozilla.org/firefox/downloads/file/4032840/${pname}-${version}.xpi"; + sha256 = "sha256-bLxjL2P6Sd06q98MSHYRTNigtcjGwn/C2r4ANWCqKrw="; + meta = with lib; { + homepage = "https://github.com/tiansh/always-in-container"; + description = + "Chose a container every time you try to open a page out of a container"; + license = licenses.mpl20; + platforms = platforms.all; + }; + }) + (buildFirefoxXpiAddon rec { + pname = "open_with"; + version = "7.2.6"; + addonId = "openwith@darktrojan.net"; + url = + "https://addons.mozilla.org/firefox/downloads/file/3831723/${pname}-${version}.xpi"; + sha256 = "sha256-f9eGhLxg4UyVn4o5e4DRkraLWzj11SGto/GOwsJa9kg="; + meta = with lib; { + homepage = "https://darktrojan.github.io/openwith/"; + description = + "Quickly test out your web pages in Chrome, Edge, Safari, or Opera. Open With opens the current page in your other browsers with just two clicks."; + license = licenses.mpl20; + platforms = platforms.all; + }; + }) + ]; + search = { + default = "Milliron X Search"; + privateDefault = "Milliron X Search"; + force = true; + engines = { + "Milliron X Search" = { + urls = [ + { + rels = [ "results" ]; + type = "text/html"; + method = "GET"; + template = + "https://search.millironx.com/search?q={searchTerms}"; + } + { + rels = [ "suggestions" ]; + type = "application/x-suggestions+json"; + method = "GET"; + template = + "https://search.millironx.com/autocompleter?q={searchTerms}"; + } + ]; + iconUpdateURL = + "https://search.millironx.com/static/themes/simple/img/favicon.png"; + updateInterval = 24 * 60 * 60 * 1000; # every day + definedAliases = [ "@mxs" ]; + }; + "Perplexity" = { + urls = + [{ template = "https://www.perplexity.ai/?q={searchTerms}"; }]; + icon = "https://www.perplexity.ai/favicon.ico"; + updateInterval = 7 * 24 * 60 * 60 * 1000; + definedAliases = [ "@pxt" ]; + }; + }; + }; + settings = { + "app.normandy.first_run" = false; + "app.shield.optoutstudies.enabled" = false; + "browser.contentblocking.category" = "strict"; + "browser.formfill.enable" = false; + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = + false; + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = + false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.activity-stream.showWeather" = false; + "browser.newtabpage.pinned" = [ + { + url = "https://millironx.com"; + label = "Home"; + baseDomain = "millironx.com"; + } + { + url = "https://nextcloud.millironx.com"; + label = "Nextcloud"; + baseDomain = "nextcloud.millironx.com"; + } + { + url = "https://code.millironx.com"; + label = "Code"; + baseDomain = "code.millironx.com"; + } + { + url = "https://video.millironx.com"; + label = "Videos"; + baseDomain = "video.millironx.com"; + } + { + url = "https://photos.millironx.com"; + label = "Photos"; + baseDomain = "photos.millironx.com"; + } + { + url = "https://vault.millironx.com"; + label = "Vault"; + baseDomain = "vault.millironx.com"; + } + { + url = "https://www.perplexity.ai/"; + label = "perplexity"; + } + { + url = + "https://www.vet.k-state.edu/academics/student-faculty-handbook/"; + } + ]; + "browser.shopping.experience2023.active" = false; + "browser.startup.homepage_override.mstone" = "ignore"; + "browser.tabs.closeWindowWithLastTab" = false; + "browser.tabs.inTitlebar" = 0; + "browser.theme.content-theme" = 0; + "browser.theme.toolbar-theme" = 0; + "browser.toolbars.bookmarks.visibility" = "never"; + "browser.uiCustomization.state" = { + placements = { + "widget-overflow-fixed-list" = [ ]; + "unified-extensions-area" = [ + "floccus_handmadeideas_org-browser-action" + "7esoorv3_alefvanoon_anonaddy_me-browser-action" + "plasma-browser-integration_kde_org-browser-action" + "firefoxpwa_filips_si-browser-action" + "_d07ccf11-c0cd-4938-a265-2a4d6ad01189_-browser-action" # Web Archives + "openwith_darktrojan_net-browser-action" + "zotero_chnm_gmu_edu-browser-action" + ]; + "nav-bar" = [ + "back-button" + "forward-button" + "customizableui-special-spring1" + "vertical-spacer" + "urlbar-container" + "stop-reload-button" + "customizableui-special-spring2" + "downloads-button" + "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" # Bitwarden + "ublock0_raymondhill_net-browser-action" + "unified-extensions-button" + "_testpilot-containers-browser-action" + ]; + "TabsToolbar" = [ + "firefox-view-button" + "tabbrowser-tabs" + "new-tab-button" + "alltabs-button" + ]; + "vertical-tabs" = [ ]; + "PersonalToolbar" = [ "import-button" "personal-bookmarks" ]; + }; + seen = [ + "save-to-pocket-button" + "developer-button" + "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" + "_testpilot-containers-browser-action" + "floccus_handmadeideas_org-browser-action" + "7esoorv3_alefvanoon_anonaddy_me-browser-action" + "plasma-browser-integration_kde_org-browser-action" + "firefoxpwa_filips_si-browser-action" + "ublock0_raymondhill_net-browser-action" + "_d07ccf11-c0cd-4938-a265-2a4d6ad01189_-browser-action" + "zotero_chnm_gmu_edu-browser-action" + "openwith_darktrojan_net-browser-action" + ]; + dirtyAreaCache = [ + "nav-bar" + "vertical-tabs" + "PersonalToolbar" + "unified-extensions-area" + ]; + currentVersion = 21; + newElementCount = 3; + }; + "browser.urlbar.suggest.showSearchSuggestionsFirst" = false; + "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; + "browser.urlbar.suggest.quicksuggest.sponsored" = false; + "browser.urlbar.suggest.quicksuggest.trending" = false; + "browser.warnOnQuitShortcut" = false; + "datareporting.healthreport.uploadEnabled" = false; + "datareporting.usage.uploadEnabled" = false; + "extensions.formautofill.addresses.enabled" = false; + "extensions.formautofill.creditCards.enabled" = false; + "extensions.autoDisableScopes" = 0; + "network.trr.mode" = 3; # DNS over HTTPS always + "network.trr.uri" = "https://family.dns.mullvad.net/dns-query"; + "network.trr.custom_uri" = "https://family.dns.mullvad.net/dns-query"; + "privacy.bounceTrackingProtection.mode" = 1; + "privacy.clearOnShutdown_v2.browsingHistoryAndDownloads" = false; + "privacy.clearOnShutdown_v2.cache" = true; + "privacy.clearOnShutdown_v2.cookiesAndStorage" = true; + "privacy.clearOnShutdown_v2.formdata" = true; + "privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = false; + "privacy.history.custom" = true; + "privacy.query_stripping.enabled" = true; + "privacy.sanitize.clearOnShutdown.hasMigratedToNewPrefs3" = true; + "privacy.sanitize.sanitizeOnShutdown" = true; + "privacy.trackingprotection.emailtracking.enabled" = true; + "privacy.trackingprotection.enabled" = true; + "privacy.trackingprotection.socialtracking.enabled" = true; + "widget.use-xdg-desktop-portal.file-picker" = 1; + }; + }; + }; +}