mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-05 16:27:03 +00:00
system-build: change type of setEnvironment and setAliases
On NixOS system.build.setEnvironment also is a writeText
This commit is contained in:
parent
a8b4770275
commit
e8355cdd93
5 changed files with 10 additions and 7 deletions
|
@ -154,14 +154,16 @@ in {
|
|||
inherit (cfg) postBuild pathsToLink extraOutputsToInstall;
|
||||
};
|
||||
|
||||
system.build.setEnvironment = ''
|
||||
system.build.setEnvironment = pkgs.writeText "set-environment" ''
|
||||
${concatStringsSep "\n" exportVariables}
|
||||
|
||||
# Extra initialisation
|
||||
${cfg.extraInit}
|
||||
'';
|
||||
|
||||
system.build.setAliases = concatStringsSep "\n" aliasCommands;
|
||||
system.build.setAliases = pkgs.writeText "set-aliases" ''
|
||||
${concatStringsSep "\n" aliasCommands}
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -73,8 +73,8 @@ in
|
|||
__ETC_BASHRC_SOURCED=1
|
||||
|
||||
export PATH=${config.environment.systemPath}
|
||||
${config.system.build.setEnvironment}
|
||||
${config.system.build.setAliases}
|
||||
${config.system.build.setEnvironment.text}
|
||||
${config.system.build.setAliases.text}
|
||||
|
||||
${config.environment.interactiveShellInit}
|
||||
${cfg.interactiveShellInit}
|
||||
|
|
|
@ -9,7 +9,7 @@ let
|
|||
|
||||
foreignEnv = pkgs.writeText "fish-foreign-env" ''
|
||||
# TODO: environment.shellInit
|
||||
${config.system.build.setEnvironment}
|
||||
${config.system.build.setEnvironment.text}
|
||||
'';
|
||||
|
||||
loginForeignEnv = pkgs.writeText "fish-login-foreign-env" ''
|
||||
|
|
|
@ -130,7 +130,7 @@ in
|
|||
if test -n "$IN_NIX_SHELL"; then return; fi
|
||||
|
||||
export PATH=${config.environment.systemPath}
|
||||
${config.system.build.setEnvironment}
|
||||
${config.system.build.setEnvironment.text}
|
||||
|
||||
${cfg.shellInit}
|
||||
|
||||
|
@ -149,7 +149,7 @@ in
|
|||
__ETC_ZPROFILE_SOURCED=1
|
||||
|
||||
${concatStringsSep "\n" zshVariables}
|
||||
${config.system.build.setAliases}
|
||||
${config.system.build.setAliases.text}
|
||||
|
||||
${cfg.loginShellInit}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ in
|
|||
|
||||
system.build = mkOption {
|
||||
internal = true;
|
||||
type = types.attrsOf types.package;
|
||||
default = {};
|
||||
description = ''
|
||||
Attribute set of derivation used to setup the system.
|
||||
|
|
Loading…
Add table
Reference in a new issue