From e8b1a63706e59cf2c2179b537442a2ad3d501225 Mon Sep 17 00:00:00 2001 From: Miranda Marquez Date: Sun, 7 Apr 2024 15:35:12 -0800 Subject: [PATCH] preinstall firefox extensions. for this NUR is needed --- flake.lock | 18 +++++++++++++++++- flake.nix | 3 +++ home.nix | 25 +++++++++++++++++++++++-- modules/nix-settings.nix | 2 +- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index efcbbdb..b70bad6 100644 --- a/flake.lock +++ b/flake.lock @@ -197,6 +197,21 @@ "type": "github" } }, + "nur": { + "locked": { + "lastModified": 1711657659, + "narHash": "sha256-kdMlKb5nWzi+EUNdpyEBKjKL/ZY75T2cngH+zfKN+Vo=", + "owner": "nix-community", + "repo": "NUR", + "rev": "7d11a87bb73d00d9fd5829b9eac36107bcdc2e28", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "apple-silicon": "apple-silicon", @@ -206,7 +221,8 @@ "home-manager-unstable": "home-manager-unstable", "mir-home": "mir-home", "nixpkgs": "nixpkgs_2", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs-unstable": "nixpkgs-unstable", + "nur": "nur" } }, "rust-overlay": { diff --git a/flake.nix b/flake.nix index e09e7ac..f3659a4 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,7 @@ url = "github:tpwrules/nixos-apple-silicon"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; + nur.url = github:nix-community/NUR; home-manager = { url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; @@ -33,6 +34,7 @@ nixpkgs, nixpkgs-unstable, home-manager, + nur, ... }: { nixosConfigurations = { kremzeek = # {{{ @@ -136,6 +138,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ + # inputs.nur.nixosModules.nur ./configuration.nix { services.xserver.videoDrivers = [ "modesetting" "displaylink" ]; boot.loader.efi.canTouchEfiVariables = true; diff --git a/home.nix b/home.nix index 9462964..874bcf7 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, inputs, ... }: +{ lib, config, pkgs, nur, inputs, ... }: with lib.hm.gvariant; { @@ -12,7 +12,6 @@ with lib.hm.gvariant; home.homeDirectory = "/home/mir"; home.packages = [ pkgs.btop - pkgs.firefox pkgs.killall pkgs.gdb pkgs.neofetch @@ -68,6 +67,7 @@ with lib.hm.gvariant; TERMINAL = "kitty"; TERM_PROGRAM = "kitty"; BROWSER = "firefox"; + MOZ_USE_XINPUT2 = "1"; }; programs.kitty = { enable = true; @@ -89,6 +89,27 @@ with lib.hm.gvariant; }; programs.firefox = { enable = true; + profiles = { + default = { + id = 0; + name = "default"; + isDefault = true; + settings = { + "browser.startup.homepage" = "https://search.marq42.xyz"; + "browser.search.defaultenginename" = "searx"; + "borwser.search.order.1" = "searx"; + }; + search = { + force = true; + default = "searx"; + order = [ "searx" "Google" ]; + }; + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + ublock-origin + vimium + ]; + }; + }; }; # programs.gdb = { # enable = true; diff --git a/modules/nix-settings.nix b/modules/nix-settings.nix index d99e9ff..9a60ba3 100644 --- a/modules/nix-settings.nix +++ b/modules/nix-settings.nix @@ -4,5 +4,5 @@ nix.settings.extra-experimental-features = [ "nix-command" "flakes" ]; # Allow unfree packages nixpkgs.config.allowUnfree = true; - + nixpkgs.overlays = [ inputs.nur.overlay ]; }