diff --git a/flake.lock b/flake.lock index 4fc5b50..da9e275 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,43 @@ { "nodes": { + "firefox-addons": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "dir": "pkgs/firefox-addons", + "lastModified": 1713078488, + "narHash": "sha256-EdCxHld1zzLdT7WteA7CULHslftZOePB9d8uDMT0tzA=", + "owner": "rycee", + "repo": "nur-expressions", + "rev": "350bef505d552eb95271b216f1852bfe83f4a4ea", + "type": "gitlab" + }, + "original": { + "dir": "pkgs/firefox-addons", + "owner": "rycee", + "repo": "nur-expressions", + "type": "gitlab" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1629284811, + "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -78,6 +116,7 @@ }, "root": { "inputs": { + "firefox-addons": "firefox-addons", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", diff --git a/flake.nix b/flake.nix index 0aba7e5..ab18267 100644 --- a/flake.nix +++ b/flake.nix @@ -14,9 +14,13 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; + firefox-addons = { + url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, plasma-manager }@inputs : + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, plasma-manager, ... }@inputs : let system = "x86_64-linux"; overlay-unstable = final: prev: { @@ -33,6 +37,7 @@ ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./hosts/comfy-station/configuration.nix home-manager.nixosModules.home-manager { + home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ]; @@ -48,6 +53,7 @@ modules = [ ./hosts/vm/configuration.nix home-manager.nixosModules.home-manager { + home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ]; diff --git a/home/jonas/firefox.nix b/home/jonas/firefox.nix new file mode 100644 index 0000000..971c475 --- /dev/null +++ b/home/jonas/firefox.nix @@ -0,0 +1,38 @@ +{ config, inputs, ... }: + +{ + programs.firefox = { + enable = true; + + # Default profile + profiles.jonas = { + name = "Jonas"; + id = 0; + isDefault = true; + + # Search + search = { + default = "DuckDuckGo"; + order = [ "DuckDuckGo" "Google" ]; + force = true; + engines = { + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { name = "type"; value = "packages"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + }; + }; + }; + + # Extensions + extensions = with inputs.firefox-addons.packages."x86_64-linux"; [ + ublock-origin + violentmonkey + ]; + }; + }; +} diff --git a/home/jonas/home.nix b/home/jonas/home.nix index 7fb2d6f..a64253b 100644 --- a/home/jonas/home.nix +++ b/home/jonas/home.nix @@ -3,6 +3,7 @@ { imports = [ ./plasma.nix + ./firefox.nix ]; # Home Manager needs a bit of information about you and the paths it should @@ -33,36 +34,6 @@ vscode ]; - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. If you don't want to manage your shell through Home - # Manager then you have to manually source 'hm-session-vars.sh' located at - # either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/jonas/etc/profile.d/hm-session-vars.sh - # home.sessionVariables = { EDITOR = "vim"; }; @@ -106,11 +77,4 @@ theme = "bureau"; }; }; - - # wayland.windowManager.hyprland = { - # enable = true; - # settings = { - # "$mod" = "SUPER"; - # }; - # }; }