treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
This commit is contained in:
parent
5df48c4255
commit
cba2f9ce95
1051 changed files with 37028 additions and 26594 deletions
|
|
@ -3,8 +3,7 @@
|
|||
{
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
accounts.email.accounts.hm-account.smtp.tls.certificatesFile =
|
||||
"/etc/test/certificates.crt";
|
||||
accounts.email.accounts.hm-account.smtp.tls.certificatesFile = "/etc/test/certificates.crt";
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
|
@ -26,9 +25,7 @@
|
|||
}
|
||||
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContent home-files/.config/git/config ${
|
||||
./git-with-email-expected.conf
|
||||
}
|
||||
assertFileContent home-files/.config/git/config ${./git-with-email-expected.conf}
|
||||
|
||||
assertGitConfig "sendemail.hm@example.com.from" "H. M. Test <hm@example.com>"
|
||||
assertGitConfig "sendemail.hm-account.from" "H. M. Test Jr. <hm@example.org>"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
hooks = { pre-commit = ./git-pre-commit-hook.sh; };
|
||||
hooks = {
|
||||
pre-commit = ./git-pre-commit-hook.sh;
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{ lib, options, ... }: {
|
||||
{ lib, options, ... }:
|
||||
{
|
||||
config = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
|
@ -13,16 +14,12 @@
|
|||
};
|
||||
|
||||
test.asserts.warnings.expected = [
|
||||
"The option `programs.git.signing.gpgPath' defined in ${
|
||||
lib.showFiles options.programs.git.signing.gpgPath.files
|
||||
} has been renamed to `programs.git.signing.signer'."
|
||||
"The option `programs.git.signing.gpgPath' defined in ${lib.showFiles options.programs.git.signing.gpgPath.files} has been renamed to `programs.git.signing.signer'."
|
||||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContent home-files/.config/git/config ${
|
||||
./git-with-signing-key-id-legacy-expected.conf
|
||||
}
|
||||
assertFileContent home-files/.config/git/config ${./git-with-signing-key-id-legacy-expected.conf}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,16 +7,13 @@
|
|||
signing = {
|
||||
signer = "path-to-ssh";
|
||||
format = "ssh";
|
||||
key =
|
||||
"ssh-ed25519 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||
key = "ssh-ed25519 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContent home-files/.config/git/config ${
|
||||
./git-with-signing-key-id-expected.conf
|
||||
}
|
||||
assertFileContent home-files/.config/git/config ${./git-with-signing-key-id-expected.conf}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,13 @@
|
|||
userName = "John Doe";
|
||||
};
|
||||
|
||||
test.asserts.warnings.expected = [''
|
||||
Using programs.git.extraConfig as a string option is
|
||||
deprecated and will be removed in the future. Please
|
||||
change to using it as an attribute set instead.
|
||||
''];
|
||||
test.asserts.warnings.expected = [
|
||||
''
|
||||
Using programs.git.extraConfig as a string option is
|
||||
deprecated and will be removed in the future. Please
|
||||
change to using it as an attribute set instead.
|
||||
''
|
||||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContent home-files/.config/git/config ${
|
||||
./git-without-signing-key-id-expected.conf
|
||||
}
|
||||
assertFileContent home-files/.config/git/config ${./git-without-signing-key-id-expected.conf}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContent home-files/.config/git/config ${
|
||||
./git-without-signing.conf
|
||||
}
|
||||
assertFileContent home-files/.config/git/config ${./git-without-signing.conf}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,16 +9,18 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
substituteExpected = path:
|
||||
substituteExpected =
|
||||
path:
|
||||
pkgs.substituteAll {
|
||||
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);
|
||||
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
|
||||
);
|
||||
};
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.git = lib.mkMerge [
|
||||
{
|
||||
enable = true;
|
||||
|
|
@ -34,7 +36,10 @@ in {
|
|||
multiple = [ 1 ];
|
||||
};
|
||||
};
|
||||
ignores = [ "*~" "*.swp" ];
|
||||
ignores = [
|
||||
"*~"
|
||||
"*.swp"
|
||||
];
|
||||
includes = [
|
||||
{ path = "~/path/to/config.inc"; }
|
||||
{
|
||||
|
|
@ -86,8 +91,6 @@ in {
|
|||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContent home-files/.config/git/config ${
|
||||
substituteExpected ./git-expected.conf
|
||||
}
|
||||
assertFileContent home-files/.config/git/config ${substituteExpected ./git-expected.conf}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue