From db9d6d82dcfd4c247367b11d1929d2aaf7d9d712 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 24 Oct 2024 09:30:46 +0300 Subject: [PATCH] Home: Disable Firefox for Android. --- home/Android.nix | 3 ++- home/HomeManager.nix | 10 +++++++-- home/NixOs.nix | 3 ++- home/program/default.nix | 37 ++++++++++++++++++++------------ home/program/firefox/default.nix | 4 +++- 5 files changed, 38 insertions(+), 19 deletions(-) diff --git a/home/Android.nix b/home/Android.nix index 2ee0d29c..d813b2d6 100644 --- a/home/Android.nix +++ b/home/Android.nix @@ -17,6 +17,7 @@ let stylix = import args; android = import ./android args; package = import args; + programs = import ./program args; in # homePath = "/data/data/com.termux.nix/files/home"; { @@ -41,7 +42,7 @@ in sessionVariables = import ./variable args; stateVersion = const.droidStateVersion; }; - programs = import ./program args; + programs = with programs; core; }; }; } diff --git a/home/HomeManager.nix b/home/HomeManager.nix index 2537cea4..c65a3b17 100644 --- a/home/HomeManager.nix +++ b/home/HomeManager.nix @@ -11,6 +11,7 @@ with lib; let cfg = config.home.hm; package = import args; + programs = import ./program args; in { options = { @@ -50,13 +51,18 @@ in sessionVariables = import ./variable args; }; xdg = import ./xdg { inherit (cfg) homeDirectory; }; - programs = import ./program args; + programs = with programs; core; dconf.settings = util.catSet (util.ls ./config/dconf) args; } (mkIf cfg.package.common.enable { home.packages = package.common; }) (mkIf cfg.package.core.enable { home.packages = package.core; }) (mkIf cfg.package.creative.enable { home.packages = package.creative; }) - (mkIf cfg.package.desktop.enable { home.packages = package.desktop; }) + (mkIf cfg.package.desktop.enable { + home = { + packages = package.desktop; + programs = programs.desktop; + }; + }) (mkIf cfg.package.dev.enable { home.packages = package.dev; }) (mkIf cfg.package.extra.enable { home.packages = package.extra; }) (mkIf cfg.package.gaming.enable { home.packages = package.gaming; }) diff --git a/home/NixOs.nix b/home/NixOs.nix index b7382d0d..01aef6b1 100644 --- a/home/NixOs.nix +++ b/home/NixOs.nix @@ -10,6 +10,7 @@ with lib; let cfg = config.home.nixos; + programs = import ./program args; in { imports = (util.ls ./user); @@ -41,7 +42,7 @@ in extraActivationPath = with pkgs; [ openssh ]; }; xdg = import ./xdg { inherit (user) homeDirectory; }; - programs = import ./program args; + programs = with programs; core // desktop; dconf.settings = util.catSet (util.ls ./config/dconf) args; }; } diff --git a/home/program/default.nix b/home/program/default.nix index 8ec1fb84..a3937cdf 100644 --- a/home/program/default.nix +++ b/home/program/default.nix @@ -1,24 +1,33 @@ -{ secret, ... }@args: +{ + secret, + lib, + config, + ... +}@args: let bash = import ./bash args; in { - home-manager.enable = true; + core = { + home-manager.enable = true; - gpg = { - enable = true; - inherit (secret.crypto) publicKeys; - mutableKeys = true; - mutableTrust = true; - settings = { - keyserver = "hkps://keys.openpgp.org"; + gpg = { + enable = true; + inherit (secret.crypto) publicKeys; + mutableKeys = true; + mutableTrust = true; + settings = { + keyserver = "hkps://keys.openpgp.org"; + }; + }; + + bash = { + enable = true; + initExtra = bash.bashrc; }; }; - firefox = import ./firefox args; - - bash = { - enable = true; - initExtra = bash.bashrc; + desktop = { + firefox = import ./firefox args; }; } diff --git a/home/program/firefox/default.nix b/home/program/firefox/default.nix index 29a4016c..10e1491e 100644 --- a/home/program/firefox/default.nix +++ b/home/program/firefox/default.nix @@ -21,7 +21,9 @@ let (mkSearchEngine "no" "NixOS Options" "https://search.nixos.org/options?query={searchTerms}") (mkSearchEngine "np" "NixOS Packages" "https://search.nixos.org/packages?query={searchTerms}") (mkSearchEngine "so" "Stack Overflow" "https://stackoverflow.com/search?tab=votes&q={searchTerms}") - (mkSearchEngine "hm" "Home Manager" "https://home-manager-options.extranix.com/?query={searchTerms}") + (mkSearchEngine "hm" "Home Manager" + "https://home-manager-options.extranix.com/?query={searchTerms}" + ) ]; extensions = {