Manage a user environment using Nix https://github.com/rycee/home-manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

home-manager.nix 892B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. { config, lib, pkgs, ... }:
  2. with lib;
  3. let
  4. cfg = config.programs.home-manager;
  5. dag = config.lib.dag;
  6. in
  7. {
  8. meta.maintainers = [ maintainers.rycee ];
  9. options = {
  10. programs.home-manager = {
  11. enable = mkEnableOption "Home Manager";
  12. path = mkOption {
  13. type = types.nullOr types.str;
  14. default = null;
  15. example = "$HOME/devel/home-manager";
  16. description = ''
  17. The default path to use for Home Manager. If this path does
  18. not exist then
  19. <filename>$HOME/.config/nixpkgs/home-manager</filename> and
  20. <filename>$HOME/.nixpkgs/home-manager</filename> will be
  21. attempted.
  22. '';
  23. };
  24. };
  25. };
  26. config = mkIf (cfg.enable && !config.submoduleSupport.enable) {
  27. home.packages = [
  28. (import ../../home-manager {
  29. inherit pkgs;
  30. inherit (cfg) path;
  31. })
  32. ];
  33. };
  34. }