diff --git a/home/Android.nix b/home/Android.nix index 2ee0d29..d813b2d 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 2537cea..c65a3b1 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 b7382d0..01aef6b 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 8ec1fb8..a3937cd 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 29a4016..10e1491 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 = {