depot/third_party/home-manager/home-manager/install.nix
Default email 75fa0ae5af Project import generated by Copybara.
GitOrigin-RevId: c3ab5ea047e6dc73df530948f7367455749d8906
2023-08-08 12:19:01 +02:00

20 lines
534 B
Nix

{ home-manager, runCommand }:
let
hmBashLibInit = ''
export TEXTDOMAIN=home-manager
export TEXTDOMAINDIR=${home-manager}/share/locale
source ${home-manager}/share/bash/home-manager.sh
'';
in runCommand "home-manager-install" {
propagatedBuildInputs = [ home-manager ];
preferLocalBuild = true;
shellHookOnly = true;
shellHook = "exec ${home-manager}/bin/home-manager init --switch --no-flake";
} ''
${hmBashLibInit}
_iError 'This derivation is not buildable, please run it using nix-shell.'
exit 1
''