-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ config, lib, utils, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
|
||
cfg = config.environment; | ||
in | ||
{ | ||
options = { | ||
environment.binsh = mkOption { | ||
default = "${config.system.build.binsh}/bin/sh"; | ||
defaultText = literalExpression ''"''${config.system.build.binsh}/bin/sh"''; | ||
example = literalExpression ''"''${pkgs.dash}/bin/dash"''; | ||
type = types.path; | ||
visible = false; | ||
description = '' | ||
The shell executable that is linked system-wide to | ||
<literal>/bin/sh</literal>. Please note that NixOS assumes all | ||
over the place that shell to be Bash, so override the default | ||
setting only if you know exactly what you're doing. | ||
''; | ||
}; | ||
}; | ||
|
||
|
||
config = { | ||
system.build.binsh = pkgs.bashInteractive; | ||
|
||
system.activationScripts.binsh = stringAfter [ "stdio" ] | ||
'' | ||
# Create the required /bin/sh symlink; otherwise lots of things | ||
# (notably the system() function) won't work. | ||
mkdir -m 0755 -p /bin | ||
ln -sfn "${cfg.binsh}" /bin/.sh.tmp | ||
mv /bin/.sh.tmp /bin/sh # atomically replace /bin/sh | ||
''; | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[ | ||
./config/binsh.nix | ||
./config/debug-info.nix | ||
./config/fonts/fontconfig.nix | ||
./config/fonts/fontdir.nix | ||
|