0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/shells: fix indent everywhere

to comply with `doc/coding-conventions.xml`
This commit is contained in:
Jan Malakhovski 2018-08-29 16:05:53 +00:00
parent d273db48c6
commit 8952375b48
4 changed files with 25 additions and 26 deletions

View file

@ -167,19 +167,19 @@ in
environment.etc."set-environment".source = config.system.build.setEnvironment; environment.etc."set-environment".source = config.system.build.setEnvironment;
system.build.setEnvironment = pkgs.writeText "set-environment" system.build.setEnvironment = pkgs.writeText "set-environment"
'' ''
# DO NOT EDIT -- this file has been generated automatically. # DO NOT EDIT -- this file has been generated automatically.
# Prevent this file from being sourced by child shells. # Prevent this file from being sourced by child shells.
export __NIXOS_SET_ENVIRONMENT_DONE=1 export __NIXOS_SET_ENVIRONMENT_DONE=1
${exportedEnvVars} ${exportedEnvVars}
${cfg.extraInit} ${cfg.extraInit}
# ~/bin if it exists overrides other bin directories. # ~/bin if it exists overrides other bin directories.
export PATH="$HOME/bin:$PATH" export PATH="$HOME/bin:$PATH"
''; '';
system.activationScripts.binsh = stringAfter [ "stdio" ] system.activationScripts.binsh = stringAfter [ "stdio" ]
'' ''

View file

@ -168,11 +168,11 @@ in
# Read system-wide modifications. # Read system-wide modifications.
if test -f /etc/profile.local; then if test -f /etc/profile.local; then
. /etc/profile.local . /etc/profile.local
fi fi
if [ -n "''${BASH_VERSION:-}" ]; then if [ -n "''${BASH_VERSION:-}" ]; then
. /etc/bashrc . /etc/bashrc
fi fi
''; '';
@ -193,12 +193,12 @@ in
# We are not always an interactive shell. # We are not always an interactive shell.
if [ -n "$PS1" ]; then if [ -n "$PS1" ]; then
${cfg.interactiveShellInit} ${cfg.interactiveShellInit}
fi fi
# Read system-wide modifications. # Read system-wide modifications.
if test -f /etc/bashrc.local; then if test -f /etc/bashrc.local; then
. /etc/bashrc.local . /etc/bashrc.local
fi fi
''; '';

View file

@ -27,7 +27,7 @@ in
''; '';
type = types.bool; type = types.bool;
}; };
vendor.config.enable = mkOption { vendor.config.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
@ -43,7 +43,7 @@ in
Whether fish should use completion files provided by other packages. Whether fish should use completion files provided by other packages.
''; '';
}; };
vendor.functions.enable = mkOption { vendor.functions.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
@ -107,7 +107,7 @@ in
# This happens before $__fish_datadir/config.fish sets fish_function_path, so it is currently # This happens before $__fish_datadir/config.fish sets fish_function_path, so it is currently
# unset. We set it and then completely erase it, leaving its configuration to $__fish_datadir/config.fish # unset. We set it and then completely erase it, leaving its configuration to $__fish_datadir/config.fish
set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $__fish_datadir/functions set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $__fish_datadir/functions
# source the NixOS environment config # source the NixOS environment config
if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ] if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]
fenv source ${config.system.build.setEnvironment} fenv source ${config.system.build.setEnvironment}
@ -125,7 +125,7 @@ in
set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path
fenv source /etc/fish/foreign-env/shellInit > /dev/null fenv source /etc/fish/foreign-env/shellInit > /dev/null
set -e fish_function_path[1] set -e fish_function_path[1]
${cfg.shellInit} ${cfg.shellInit}
# and leave a note so we don't source this config section again from # and leave a note so we don't source this config section again from
@ -139,7 +139,7 @@ in
set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path
fenv source /etc/fish/foreign-env/loginShellInit > /dev/null fenv source /etc/fish/foreign-env/loginShellInit > /dev/null
set -e fish_function_path[1] set -e fish_function_path[1]
${cfg.loginShellInit} ${cfg.loginShellInit}
# and leave a note so we don't source this config section again from # and leave a note so we don't source this config section again from
@ -151,12 +151,11 @@ in
status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced
and begin and begin
${fishAliases} ${fishAliases}
set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path
fenv source /etc/fish/foreign-env/interactiveShellInit > /dev/null fenv source /etc/fish/foreign-env/interactiveShellInit > /dev/null
set -e fish_function_path[1] set -e fish_function_path[1]
${cfg.promptInit} ${cfg.promptInit}
${cfg.interactiveShellInit} ${cfg.interactiveShellInit}
@ -172,7 +171,7 @@ in
++ optional cfg.vendor.config.enable "/share/fish/vendor_conf.d" ++ optional cfg.vendor.config.enable "/share/fish/vendor_conf.d"
++ optional cfg.vendor.completions.enable "/share/fish/vendor_completions.d" ++ optional cfg.vendor.completions.enable "/share/fish/vendor_completions.d"
++ optional cfg.vendor.functions.enable "/share/fish/vendor_functions.d"; ++ optional cfg.vendor.functions.enable "/share/fish/vendor_functions.d";
environment.systemPackages = [ pkgs.fish ]; environment.systemPackages = [ pkgs.fish ];
environment.shells = [ environment.shells = [

View file

@ -70,7 +70,7 @@ in
promptInit = mkOption { promptInit = mkOption {
default = '' default = ''
if [ "$TERM" != dumb ]; then if [ "$TERM" != dumb ]; then
autoload -U promptinit && promptinit && prompt walters autoload -U promptinit && promptinit && prompt walters
fi fi
''; '';
description = '' description = ''
@ -113,7 +113,7 @@ in
# Read system-wide modifications. # Read system-wide modifications.
if test -f /etc/zshenv.local; then if test -f /etc/zshenv.local; then
. /etc/zshenv.local . /etc/zshenv.local
fi fi
''; '';
@ -132,7 +132,7 @@ in
# Read system-wide modifications. # Read system-wide modifications.
if test -f /etc/zprofile.local; then if test -f /etc/zprofile.local; then
. /etc/zprofile.local . /etc/zprofile.local
fi fi
''; '';
@ -158,7 +158,7 @@ in
# Tell zsh how to find installed completions # Tell zsh how to find installed completions
for p in ''${(z)NIX_PROFILES}; do for p in ''${(z)NIX_PROFILES}; do
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions) fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
done done
${optionalString cfg.enableCompletion "autoload -U compinit && compinit"} ${optionalString cfg.enableCompletion "autoload -U compinit && compinit"}
@ -173,7 +173,7 @@ in
# Read system-wide modifications. # Read system-wide modifications.
if test -f /etc/zshrc.local; then if test -f /etc/zshrc.local; then
. /etc/zshrc.local . /etc/zshrc.local
fi fi
''; '';