core: wrap nix with wrapped commands
This commit is contained in:
parent
9abc9c10ba
commit
82bf8ab05f
1 changed files with 11 additions and 3 deletions
|
@ -23,10 +23,17 @@ let
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
wrapedNixPrograms = [
|
# bool -> nixpkgs[]
|
||||||
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-build"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar-with-logs"];})
|
wrappedNixExecutables = inEnvironment: assert builtins.isBool inEnvironment; [
|
||||||
|
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-build"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar${lib.optionalString inEnvironment "-with-logs"}"];})
|
||||||
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-shell"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar"];})
|
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-shell"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar"];})
|
||||||
];
|
];
|
||||||
|
wrappedNix = (pkgs.buildEnv {
|
||||||
|
name = "wrappedNix-${pkgs.nix.version}";
|
||||||
|
paths = [ pkgs.nix ] ++ wrappedNixExecutables false;
|
||||||
|
}).overrideAttrs {
|
||||||
|
version = pkgs.nix.version;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# kernel
|
# kernel
|
||||||
|
@ -37,6 +44,7 @@ in
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nix.package = wrappedNix;
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
|
@ -49,7 +57,7 @@ in
|
||||||
fastfetch
|
fastfetch
|
||||||
smartmontools
|
smartmontools
|
||||||
ddrescue
|
ddrescue
|
||||||
] ++ wrapedNixPrograms;
|
] ++ wrappedNixExecutables true;
|
||||||
|
|
||||||
programs.git.enable = true;
|
programs.git.enable = true;
|
||||||
programs.git.config = {
|
programs.git.config = {
|
||||||
|
|
Loading…
Reference in a new issue