mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-14 13:01:09 +01:00
treewide: substituteAll -> replaceVars/substitute
substituteAll is now officially deprecated.
This commit is contained in:
parent
d31710fb2c
commit
abfad3d295
12 changed files with 56 additions and 43 deletions
|
|
@ -14,9 +14,13 @@ let
|
|||
|
||||
withName =
|
||||
path:
|
||||
pkgs.substituteAll {
|
||||
pkgs.substitute {
|
||||
src = path;
|
||||
name = cfg.wrappedPackageName;
|
||||
substitutions = [
|
||||
"--replace"
|
||||
"@name@"
|
||||
cfg.wrappedPackageName
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
|
|
|
|||
|
|
@ -11,12 +11,16 @@ let
|
|||
|
||||
substituteExpected =
|
||||
path:
|
||||
pkgs.substituteAll {
|
||||
pkgs.substitute {
|
||||
src = path;
|
||||
git_include_path = pkgs.writeText "hm_gitconfig" (builtins.readFile ./git-expected-include.conf);
|
||||
git_named_include_path = pkgs.writeText "hm_gitconfigwork" (
|
||||
builtins.readFile ./git-expected-include.conf
|
||||
);
|
||||
substitutions = [
|
||||
"--replace"
|
||||
"@git_include_path@"
|
||||
(pkgs.writeText "hm_gitconfig" (builtins.readFile ./git-expected-include.conf))
|
||||
"--replace"
|
||||
"@git_named_include_path@"
|
||||
(pkgs.writeText "hm_gitconfigwork" (builtins.readFile ./git-expected-include.conf))
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
|
|
|
|||
|
|
@ -1,15 +1,3 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
|
||||
substituteExpected =
|
||||
path:
|
||||
pkgs.substituteAll {
|
||||
src = path;
|
||||
|
||||
sensible_rtp = pkgs.tmuxPlugins.sensible.rtp;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
config = {
|
||||
programs.tmux = {
|
||||
|
|
@ -19,8 +7,7 @@ in
|
|||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/tmux/tmux.conf
|
||||
assertFileContent home-files/.config/tmux/tmux.conf \
|
||||
${substituteExpected ./default-shell.conf}
|
||||
assertFileContent home-files/.config/tmux/tmux.conf ${./default-shell.conf}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue