New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
home-manager:init at 2017-10-11 #30330
Conversation
--subst-var-by MODULES_PATH '${modulesPathStr}' \ | ||
--subst-var-by HOME_MANAGER_EXPR_PATH "${dot}.nix" | ||
|
||
wrapProgram $out/bin/home-manager --prefix NIX_PATH : home-manager=${src}/modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of setting NIX_PATH
here could set
--subst-var-by MODULES_PATH '${if modulesPath == null then "${src}/modules" else modulesPath}'
above. Then a user could override the path to the modules, if they want, but by default it should use the downloaded ones.
pkgs/top-level/all-packages.nix
Outdated
@@ -1115,6 +1115,8 @@ with pkgs; | |||
|
|||
hid-listen = callPackage ../tools/misc/hid-listen { }; | |||
|
|||
home-manager = callPackage ../applications/misc/home-manager {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Home Manager would be considered a tool rather than an application since it is not intended for interactive use.
It would be really nice to have Home Manager be installable directly from Nixpkgs but I've avoided it thus far due to the general difficulty posed by keeping the modules up-to-date. Basically, whenever something changes in the Home Manager modules we'd have to bump the version of the Nixpkgs package. Maybe it is not a big problem for Nixpkgs unstable but once it ends up in a stable version things get trickier, I guess. |
#Taken directly from | ||
#https://github.com/rycee/home-manager/blob/9c1b3735b402346533449efc741f191d6ef578dd/home-manager/default.nix | ||
|
||
{ pkgs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The arguments should be made more "standard". I.e., instead of pulling everything from pkgs
, should include stdenv
, fetchFromGitHub
, bash
, coreutils
, etc. here.
|
||
pkgs.stdenv.mkDerivation rec{ | ||
name = "home-manager-${version}"; | ||
version="2017-10-11"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have spaces around =
.
I understand this is taken verbatim from upstream, but it really requires quite a bit of cleanup to be ready for merging. |
Just integrated @rycee's suggestions. Thus the nixpkgs stable and unstable would point to different revisions,and the stable one would be frozen to where it was when nixpkgs was frozen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the issues are minor.
#Taken directly from | ||
#https://github.com/rycee/home-manager/blob/9c1b3735b402346533449efc741f191d6ef578dd/home-manager/default.nix | ||
|
||
{ pkgs,bash,coreutils,less,stdenv,makeWrapper,fetchFromGitHub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We don't need
pkgs
- We typically put a space after comma
,
, modulesPath ? null | ||
}: | ||
|
||
stdenv.mkDerivation rec{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space after rec
stdenv.mkDerivation rec{ | ||
name = "home-manager-${version}"; | ||
version = "2017-10-11"; | ||
src=fetchFromGitHub{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space before and after =
rev = "7e6f3364bcf0a0ec838aa4853f550a9a7b5ed027"; | ||
sha256 = "04wl0jpha19fsnyc5a8y4pkss9by468k0i5w5bjswnaz792yji6v"; | ||
}; | ||
buildInputs=[makeWrapper]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nativeBuildInputs
notbuildInputs
formakeWrapper
=
spaces- Space after
[
and before]
.
sha256 = "04wl0jpha19fsnyc5a8y4pkss9by468k0i5w5bjswnaz792yji6v"; | ||
}; | ||
buildInputs=[makeWrapper]; | ||
phases = [ "installPhase" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably in general don't want to override phases
. Instead specifically exclude the phases you don't need. In this case that will probably be dontBuild = true;
.
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "A user environment configurator"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about license?
|
||
meta = with stdenv.lib; { | ||
description = "A user environment configurator"; | ||
maintainers = [ maintainers.rycee ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be maintainers = with maintainers; [ rycee ];
Ok why the the Travis build is failing? |
The Travis failure seems unrelated to your PR. |
Ok,I am trying to update home-manager but with the following
|
HM was in nix-community/home-manager@bf3a8c6 changed to only use
to read
This change was made to support the new installation instructions and also using Home Manager as a NixOS module. My suggestion is still to install HM separately from Nixpkgs for now and use the |
… HOME_MANAGER_PATH
I would like if @peterhoeg could review this pr,now that all automatic checks have passed |
Just a few minor nitpicks: a) the documentation at the top isn't correct - it isn't taken verbatim but adapted from |
Thanks @pasqui23 ! |
Motivation for this change
home-manager
is a manager of user environments using nixThings done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)