treewide: add language annotations for inline code

Instruct editors to correctly highlight and evaluate inline code blocks.
This commit is contained in:
Martin Weinelt
2026-03-12 12:58:45 +01:00
parent 405f2180d4
commit 06cc71c76e
8 changed files with 563 additions and 518 deletions
+3 -1
View File
@@ -69,7 +69,9 @@ rec {
passwordFile,
destination,
}:
pkgs.writeScript "append-ldap-bind-pwd-in-${name}" ''
pkgs.writeScript "append-ldap-bind-pwd-in-${name}"
# bash
''
#!${pkgs.stdenv.shell}
set -euo pipefail
+4 -1
View File
@@ -96,7 +96,10 @@ let
destination = ldapConfFile;
};
genPasswdScript = pkgs.writeScript "generate-password-file" ''
genPasswdScript =
pkgs.writeScript "generate-password-file"
# bash
''
#!${pkgs.stdenv.shell}
set -euo pipefail
+4 -1
View File
@@ -43,7 +43,10 @@ let
group = vmailGroupName;
};
virtualMailUsersActivationScript = pkgs.writeScript "activate-virtual-mail-users" ''
virtualMailUsersActivationScript =
pkgs.writeScript "activate-virtual-mail-users"
# bash
''
#!${pkgs.stdenv.shell}
set -euo pipefail
+9 -3
View File
@@ -144,7 +144,9 @@
password user2
'';
};
"root/virus-email".text = ''
"root/virus-email".text =
# mail
''
From: User2 <user@example2.com>
Content-Type: multipart/mixed;
boundary="Apple-Mail=_2689C63E-FD18-4E4D-8822-54797BDA9607"
@@ -180,7 +182,9 @@
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
--Apple-Mail=_2689C63E-FD18-4E4D-8822-54797BDA9607--
'';
"root/safe-email".text = ''
"root/safe-email".text =
# mail
''
From: User <user@example2.com>
To: User1 <user1@example.com>
Cc:
@@ -198,7 +202,9 @@
};
};
testScript = ''
testScript =
# python
''
start_all()
server.wait_for_unit("multi-user.target")
+36 -11
View File
@@ -121,7 +121,10 @@
echo grep '^Message-ID:.*@mail.example.com>$' "$@" >&2
exec grep '^Message-ID:.*@mail.example.com>$' "$@"
'';
test-imap-spam = pkgs.writeScriptBin "imap-mark-spam" ''
test-imap-spam =
pkgs.writeScriptBin "imap-mark-spam"
# python
''
#!${pkgs.python3.interpreter}
import imaplib
@@ -148,7 +151,10 @@
imap.close()
'';
test-imap-ham = pkgs.writeScriptBin "imap-mark-ham" ''
test-imap-ham =
pkgs.writeScriptBin "imap-mark-ham"
# python
''
#!${pkgs.python3.interpreter}
import imaplib
@@ -175,7 +181,10 @@
imap.close()
'';
search = pkgs.writeScriptBin "search" ''
search =
pkgs.writeScriptBin "search"
# python
''
#!${pkgs.python3.interpreter}
import imaplib
import sys
@@ -269,7 +278,9 @@
password user1
'';
};
"root/email1".text = ''
"root/email1".text =
# mail
''
Message-ID: <12345qwerty@host.local.network>
From: User2 <user2@example.com>
To: User1 <user1@example.com>
@@ -282,7 +293,9 @@
how are you doing today?
'';
"root/email2".text = ''
"root/email2".text =
# mail
''
Message-ID: <232323abc@host.local.network>
From: User <user@example2.com>
To: User1 <user1@example.com>
@@ -297,7 +310,9 @@
XOXO User1
'';
"root/email3".text = ''
"root/email3".text =
# mail
''
Message-ID: <asdfghjkl42@host.local.network>
From: Postmaster <postmaster@example.com>
To: Chuck <chuck@example.com>
@@ -311,7 +326,9 @@
I think I may have misconfigured the mail server
XOXO Postmaster
'';
"root/email4".text = ''
"root/email4".text =
# mail
''
Message-ID: <sdfsdf@host.local.network>
From: Single Alias <single-alias@example.com>
To: User1 <user1@example.com>
@@ -326,7 +343,9 @@
XOXO User1 aka Single Alias
'';
"root/email5".text = ''
"root/email5".text =
# mail
''
Message-ID: <789asdf@host.local.network>
From: User2 <user2@example.com>
To: Multi Alias <multi-alias@example.com>
@@ -341,7 +360,9 @@
XOXO User1
'';
"root/email6".text = ''
"root/email6".text =
# mail
''
Message-ID: <123457qwerty@host.local.network>
From: User2 <user2@example.com>
To: User1 <user1@example.com>
@@ -355,7 +376,9 @@
this email contains the needle:
576a4565b70f5a4c1a0925cabdb587a6
'';
"root/email7".text = ''
"root/email7".text =
# mail
''
Message-ID: <1234578qwerty@host.local.network>
From: User2 <user2@example.com>
To: User1 <user1@example.com>
@@ -372,7 +395,9 @@
};
};
testScript = ''
testScript =
# python
''
start_all()
server.wait_for_unit("multi-user.target")
+1
View File
@@ -122,6 +122,7 @@ in
nodes,
...
}:
# python
''
machine.start()
machine.wait_for_unit("multi-user.target")
+4 -1
View File
@@ -53,7 +53,9 @@ in
};
};
};
declarativeContents."dc=example" = ''
declarativeContents."dc=example" =
#ldif
''
dn: dc=example
objectClass: domain
dc: example
@@ -121,6 +123,7 @@ in
nodes,
...
}:
# python
''
import sys
import re
+3 -1
View File
@@ -90,7 +90,9 @@ in
];
};
};
testScript = ''
testScript =
# python
''
start_all()
for domain in [domain1, domain2]: