mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-05 16:41:04 +01:00
tests/discord: init
This commit is contained in:
parent
08abff6fbc
commit
fb76be5dff
3 changed files with 30 additions and 0 deletions
23
tests/modules/programs/discord/basic-configuration.nix
Normal file
23
tests/modules/programs/discord/basic-configuration.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
config = {
|
||||
programs.discord = {
|
||||
enable = true;
|
||||
settings.DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = true;
|
||||
};
|
||||
|
||||
nmt.script =
|
||||
let
|
||||
configDir =
|
||||
if pkgs.stdenv.hostPlatform.isLinux then
|
||||
"home-files/.config/discord"
|
||||
else
|
||||
"home-files/Library/Application Support/discord";
|
||||
in
|
||||
''
|
||||
assertFileExists "${configDir}/settings.json"
|
||||
assertFileContent "${configDir}/settings.json" \
|
||||
${./basic-settings.json}
|
||||
'';
|
||||
};
|
||||
}
|
||||
4
tests/modules/programs/discord/basic-settings.json
Normal file
4
tests/modules/programs/discord/basic-settings.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true,
|
||||
"SKIP_HOST_UPDATE": true
|
||||
}
|
||||
3
tests/modules/programs/discord/default.nix
Normal file
3
tests/modules/programs/discord/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
discord-basic-configuration = ./basic-configuration.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue