mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
Merge c06da7085d into 0562fef070
This commit is contained in:
commit
f16ea0f360
5 changed files with 144 additions and 73 deletions
|
|
@ -48,6 +48,24 @@ This release has the following notable changes:
|
||||||
to your configuration. This option is likely to be deprecated in the
|
to your configuration. This option is likely to be deprecated in the
|
||||||
future.
|
future.
|
||||||
|
|
||||||
|
- By default, Home Manager imports all modules, which leads to
|
||||||
|
increased evaluation time. Some users may wish to only import the
|
||||||
|
modules they actually use. To accomodate this, a new option
|
||||||
|
`home-manager.minimal` has been added. When this option is enabled,
|
||||||
|
Home Manager will only import the basic set of modules it requires
|
||||||
|
to function. Other modules will have to be enabled manually, like
|
||||||
|
this:
|
||||||
|
|
||||||
|
|
||||||
|
```nix
|
||||||
|
imports = [
|
||||||
|
"${modulesPath}/programs/fzf.nix"
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
This entrypoint is only recommended for advanced users, who are
|
||||||
|
comfortable maintaining a personal list of modules to import.
|
||||||
|
|
||||||
- The use of `services.syncthing.tray` as a Boolean option was removed
|
- The use of `services.syncthing.tray` as a Boolean option was removed
|
||||||
after being deprecated in 2021. You are now expected to use
|
after being deprecated in 2021. You are now expected to use
|
||||||
[](#opt-services.syncthing.tray.enable) to enable the Syncthing tray
|
[](#opt-services.syncthing.tray.enable) to enable the Syncthing tray
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
lib ? pkgs.lib,
|
lib ? pkgs.lib,
|
||||||
modules ? [ ],
|
modules ? [ ],
|
||||||
pkgs,
|
pkgs,
|
||||||
|
minimal ? false,
|
||||||
}:
|
}:
|
||||||
import ../modules {
|
import ../modules {
|
||||||
inherit
|
inherit
|
||||||
|
|
@ -16,6 +17,7 @@
|
||||||
extraSpecialArgs
|
extraSpecialArgs
|
||||||
lib
|
lib
|
||||||
pkgs
|
pkgs
|
||||||
|
minimal
|
||||||
;
|
;
|
||||||
configuration = {
|
configuration = {
|
||||||
imports = modules ++ [
|
imports = modules ++ [
|
||||||
|
|
|
||||||
22
modules/misc/news/2025/10/2025-10-10_20-06-01.nix
Normal file
22
modules/misc/news/2025/10/2025-10-10_20-06-01.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
time = "2025-10-11T00:06:01+00:00";
|
||||||
|
condition = true;
|
||||||
|
message = ''
|
||||||
|
A new option is availabe: `home-manager.minimal`
|
||||||
|
|
||||||
|
By default, Home Manager imports all modules, which leads to increased
|
||||||
|
evaluation time. Some users may wish to only import the modules they
|
||||||
|
actually use. When the new option is enabled, Home Manager will only
|
||||||
|
import the basic set of modules it requires to function. Other modules
|
||||||
|
will have to be enabled manually, like this:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
imports = [
|
||||||
|
"''${modulesPath}/programs/fzf.nix"
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
This entrypoint is only recommended for advanced users, who are
|
||||||
|
comfortable maintaining a personal list of modules to import.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -9,85 +9,105 @@
|
||||||
|
|
||||||
# If disabled, the pkgs attribute passed to this function is used instead.
|
# If disabled, the pkgs attribute passed to this function is used instead.
|
||||||
useNixpkgsModule ? true,
|
useNixpkgsModule ? true,
|
||||||
|
|
||||||
|
# Whether to only import the required modules, and let the user add modules
|
||||||
|
# manually
|
||||||
|
minimal ? false,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
modules = [
|
modules = builtins.concatLists [
|
||||||
# keep-sorted start case=no numeric=yes
|
|
||||||
./accounts/calendar.nix
|
|
||||||
./accounts/contacts.nix
|
|
||||||
./accounts/email.nix
|
|
||||||
./config/home-cursor.nix
|
|
||||||
./config/i18n.nix
|
|
||||||
./dbus.nix
|
|
||||||
./files.nix
|
|
||||||
./home-environment.nix
|
|
||||||
./i18n/input-method/default.nix
|
|
||||||
./launchd/default.nix
|
|
||||||
./manual.nix
|
|
||||||
./misc/dconf.nix
|
|
||||||
./misc/debug.nix
|
|
||||||
./misc/editorconfig.nix
|
|
||||||
./misc/fontconfig.nix
|
|
||||||
./misc/gtk.nix
|
|
||||||
./misc/lib.nix
|
|
||||||
./misc/mozilla-messaging-hosts.nix
|
|
||||||
./misc/news.nix
|
|
||||||
./misc/nix-remote-build.nix
|
|
||||||
./misc/nix.nix
|
|
||||||
./misc/nixgl.nix
|
|
||||||
./misc/numlock.nix
|
|
||||||
./misc/pam.nix
|
|
||||||
./misc/qt.nix
|
|
||||||
./misc/qt/kconfig.nix
|
|
||||||
./misc/shell.nix
|
|
||||||
./misc/specialisation.nix
|
|
||||||
./misc/submodule-support.nix
|
|
||||||
./misc/tmpfiles.nix
|
|
||||||
./misc/uninstall.nix
|
|
||||||
./misc/version.nix
|
|
||||||
./misc/vte.nix
|
|
||||||
./misc/xdg-autostart.nix
|
|
||||||
./misc/xdg-desktop-entries.nix
|
|
||||||
./misc/xdg-mime-apps.nix
|
|
||||||
./misc/xdg-mime.nix
|
|
||||||
./misc/xdg-portal.nix
|
|
||||||
./misc/xdg-system-dirs.nix
|
|
||||||
./misc/xdg-terminal-exec.nix
|
|
||||||
./misc/xdg-user-dirs.nix
|
|
||||||
./misc/xdg.nix
|
|
||||||
./misc/xfconf.nix
|
|
||||||
./systemd.nix
|
|
||||||
./targets/darwin
|
|
||||||
./targets/generic-linux.nix
|
|
||||||
./wayland.nix
|
|
||||||
./xresources.nix
|
|
||||||
./xsession.nix
|
|
||||||
# keep-sorted end
|
|
||||||
(pkgs.path + "/nixos/modules/misc/assertions.nix")
|
|
||||||
(pkgs.path + "/nixos/modules/misc/meta.nix")
|
|
||||||
# Module deprecations and removals
|
|
||||||
./deprecations.nix
|
|
||||||
]
|
|
||||||
++ (lib.concatMap
|
|
||||||
(
|
|
||||||
dir:
|
|
||||||
lib.pipe (builtins.readDir dir) [
|
|
||||||
(lib.filterAttrs (path: _kind: !lib.hasPrefix "_" path))
|
|
||||||
(lib.filterAttrs (
|
|
||||||
_path: kind: kind == "directory" || (kind == "regular" && lib.hasSuffix ".nix" _path)
|
|
||||||
))
|
|
||||||
(lib.mapAttrsToList (path: _kind: lib.path.append dir path))
|
|
||||||
]
|
|
||||||
)
|
|
||||||
[
|
[
|
||||||
./services
|
# keep-sorted start case=no numeric=yes
|
||||||
./programs
|
./accounts/calendar.nix
|
||||||
|
./accounts/contacts.nix
|
||||||
|
./accounts/email.nix
|
||||||
|
./config/home-cursor.nix
|
||||||
|
./config/i18n.nix
|
||||||
|
./dbus.nix
|
||||||
|
./files.nix
|
||||||
|
./home-environment.nix
|
||||||
|
./i18n/input-method/default.nix
|
||||||
|
./launchd/default.nix
|
||||||
|
./manual.nix
|
||||||
|
./misc/dconf.nix
|
||||||
|
./misc/debug.nix
|
||||||
|
./misc/editorconfig.nix
|
||||||
|
./misc/fontconfig.nix
|
||||||
|
./misc/gtk.nix
|
||||||
|
./misc/lib.nix
|
||||||
|
./misc/mozilla-messaging-hosts.nix
|
||||||
|
./misc/news.nix
|
||||||
|
./misc/nix-remote-build.nix
|
||||||
|
./misc/nix.nix
|
||||||
|
./misc/nixgl.nix
|
||||||
|
./misc/numlock.nix
|
||||||
|
./misc/pam.nix
|
||||||
|
./misc/qt.nix
|
||||||
|
./misc/qt/kconfig.nix
|
||||||
|
./misc/shell.nix
|
||||||
|
./misc/specialisation.nix
|
||||||
|
./misc/submodule-support.nix
|
||||||
|
./misc/tmpfiles.nix
|
||||||
|
./misc/uninstall.nix
|
||||||
|
./misc/version.nix
|
||||||
|
./misc/vte.nix
|
||||||
|
./misc/xdg-autostart.nix
|
||||||
|
./misc/xdg-desktop-entries.nix
|
||||||
|
./misc/xdg-mime-apps.nix
|
||||||
|
./misc/xdg-mime.nix
|
||||||
|
./misc/xdg-portal.nix
|
||||||
|
./misc/xdg-system-dirs.nix
|
||||||
|
./misc/xdg-terminal-exec.nix
|
||||||
|
./misc/xdg-user-dirs.nix
|
||||||
|
./misc/xdg.nix
|
||||||
|
./misc/xfconf.nix
|
||||||
|
./systemd.nix
|
||||||
|
./targets/darwin
|
||||||
|
./targets/generic-linux.nix
|
||||||
|
./wayland.nix
|
||||||
|
./xresources.nix
|
||||||
|
./xsession.nix
|
||||||
|
# keep-sorted end
|
||||||
|
(pkgs.path + "/nixos/modules/misc/assertions.nix")
|
||||||
|
(pkgs.path + "/nixos/modules/misc/meta.nix")
|
||||||
|
# Module deprecations and removals
|
||||||
|
./deprecations.nix
|
||||||
]
|
]
|
||||||
)
|
|
||||||
++ lib.optional useNixpkgsModule ./misc/nixpkgs.nix
|
(lib.optional useNixpkgsModule ./misc/nixpkgs.nix)
|
||||||
++ lib.optional (!useNixpkgsModule) ./misc/nixpkgs-disabled.nix;
|
|
||||||
|
(lib.optional (!useNixpkgsModule) ./misc/nixpkgs-disabled.nix)
|
||||||
|
|
||||||
|
(
|
||||||
|
if minimal then
|
||||||
|
[
|
||||||
|
./programs/bash.nix
|
||||||
|
./programs/autojump.nix # Dependency of bash module
|
||||||
|
./programs/zsh
|
||||||
|
./programs/ion.nix
|
||||||
|
./programs/nushell.nix
|
||||||
|
./services/window-managers/i3-sway/default.nix # Dependency of home-cursor module
|
||||||
|
]
|
||||||
|
else
|
||||||
|
lib.concatMap
|
||||||
|
(
|
||||||
|
dir:
|
||||||
|
lib.pipe (builtins.readDir dir) [
|
||||||
|
(lib.filterAttrs (path: _kind: !lib.hasPrefix "_" path))
|
||||||
|
(lib.filterAttrs (
|
||||||
|
_path: kind: kind == "directory" || (kind == "regular" && lib.hasSuffix ".nix" _path)
|
||||||
|
))
|
||||||
|
(lib.mapAttrsToList (path: _kind: lib.path.append dir path))
|
||||||
|
]
|
||||||
|
)
|
||||||
|
[
|
||||||
|
./services
|
||||||
|
./programs
|
||||||
|
]
|
||||||
|
)
|
||||||
|
];
|
||||||
|
|
||||||
pkgsModule =
|
pkgsModule =
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ let
|
||||||
import ../modules/modules.nix {
|
import ../modules/modules.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
lib = extendedLib;
|
lib = extendedLib;
|
||||||
|
minimal = cfg.minimal;
|
||||||
useNixpkgsModule = !cfg.useGlobalPkgs;
|
useNixpkgsModule = !cfg.useGlobalPkgs;
|
||||||
}
|
}
|
||||||
++ cfg.sharedModules;
|
++ cfg.sharedModules;
|
||||||
|
|
@ -115,6 +116,14 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
minimal = mkEnableOption ''
|
||||||
|
only the necessary modules that allow home-manager to function. This can
|
||||||
|
be used to allow vendoring a minimal list of modules yourself, rather than
|
||||||
|
importing every single module. THIS IS FOR ADVANCED USERS, AND WILL
|
||||||
|
DISABLE ALmOST EVERY MODULE. THIS SHOULD NOT BE ENABLED UNLESS YOU KNOW
|
||||||
|
THE IMPLICATIONS.
|
||||||
|
'';
|
||||||
|
|
||||||
sharedModules = mkOption {
|
sharedModules = mkOption {
|
||||||
type = with types; listOf raw;
|
type = with types; listOf raw;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue