mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
tests/discord: make the basic configuration test cross platform
This commit is contained in:
parent
ce7cd8bbd0
commit
cfc66b91ae
2 changed files with 15 additions and 8 deletions
|
|
@ -1,3 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
config = {
|
||||
programs.discord = {
|
||||
|
|
@ -5,11 +6,18 @@
|
|||
enableDevtools = true;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
configDir=home-files/.config/discord
|
||||
assertFileExists $configDir/settings.json
|
||||
assertFileContent $configDir/settings.json \
|
||||
${./basic-settings.json}
|
||||
'';
|
||||
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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ lib, pkgs, ... }:
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
{
|
||||
discord-basic-configuration = ./basic-configuration.nix;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue