1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00
home-manager/modules
polykernel 32e433d07d
nix: add structural settings (#2718)
Nix permits user level configurations through ~/.config/nix/nix.conf that allow
customization of system-wide settings and behavior. This is beneficial in chroot
environments and for per-user configurations. System level Nix configurations in the
form of /etc/nix/nix.conf can be specified declaratively via the NixOS nix module but as
of currently no counter part exists in home-manager.

This PR is a port of the RFC42 implementation for the NixOS nix module[1]
to home-manager. Non-applicable options have been excluded and the config generation
backends have been tweaked to the backends offered by home-manager. A notable change
from the NixOS module is a mandatory option to specify the Nix binary corresponding
to the version "nix.conf" should be generated against. This is necessary because
the validation phase is dependent on the `nix show-config` subcommand on the host platform.
While it is possible to avoid validation entirely, the lack of type checking was deemed too significant.
In NixOs, the version information can be retrieved from the `package` option itself which
declares the Nix binary system-wide. However in home-manager, there is no pure way to
detect the system Nix version and what state version the "nix.conf" should be generated
against. Thus an option is used to overcome this limitation by forcing the user to
specify the Nix package. Note this interaction can still be automated by forwarding
the system-wide Nix package to the home-manager module if needed.

Three unit tests were added to test the module behavior for the empty settings, the example
settings and the example registry configurations respectively.

[1] - NixOS/nixpkgs#139075
2022-03-17 22:47:32 -04:00
..
accounts email: add fastmail.com email flavor (#2457) 2021-11-14 00:07:23 +01:00
config Replace pkgs.hostPlatform by pkgs.stdenv.hostPlatform 2021-12-03 23:36:50 +01:00
i18n/input-method kime: Fix kime systemd service broken (#2621) 2022-01-17 13:53:42 -05:00
launchd launchd: fix multiple agents 2022-02-27 14:58:54 +01:00
lib fusuma: add module 2022-03-13 22:17:55 +01:00
lib-bash treewide: make a few more strings translatable 2022-01-02 11:56:52 +01:00
misc nix: add structural settings (#2718) 2022-03-17 22:47:32 -04:00
po Translate using Weblate (Turkish) 2022-03-06 10:08:57 +01:00
programs neovim/coc: fix loading CoC plugin (#2801) 2022-03-17 20:43:03 -06:00
services fusuma: add module 2022-03-13 22:17:55 +01:00
targets Replace pkgs.hostPlatform by pkgs.stdenv.hostPlatform 2021-12-03 23:36:50 +01:00
default.nix modules: don't reference deprecated stdenv.lib (#1770) 2021-02-01 09:52:05 -05:00
files.nix home-manager: add basic i18n support 2021-12-13 21:47:28 +01:00
home-environment.nix treewide: make a few more strings translatable 2022-01-02 11:56:52 +01:00
manual.nix docs: rename "doc" directory to "docs" 2021-08-17 19:35:11 +02:00
modules.nix fusuma: add module 2022-03-13 22:17:55 +01:00
systemd-activate.rb Revert "systemd: use sd-switch" 2020-08-04 19:38:14 +02:00
systemd-activate.sh Revert "systemd: use sd-switch" 2020-08-04 19:38:14 +02:00
systemd.nix systemd: do not install systemd files when user is root (#2454) 2021-11-23 01:06:43 -05:00
xcursor.nix gtk: add cursor theme configuration (#2481) 2022-03-17 15:30:48 -04:00
xresources.nix Replace usage of literalExample 2021-10-13 00:16:10 +02:00
xsession.nix xsession: add xplugd service to accompany setxkbmap (#2450) 2021-12-23 15:38:44 -05:00