summaryrefslogtreecommitdiff
path: root/tests/shells.Tests.ps1
diff options
context:
space:
mode:
authornzbr <mail@nzbr.de>2023-07-24 05:10:48 +0200
committernzbr <mail@nzbr.de>2023-07-24 05:10:48 +0200
commit0c872dac648a76e4a768c7a943223c19ac8ad7be (patch)
treed0b0c9b5ad8ca63aea25f20586eab2518f9bbded /tests/shells.Tests.ps1
parent163848677e2d9eebd6a08a18cf77af6cc6a88813 (diff)
fix: shells test
Diffstat (limited to 'tests/shells.Tests.ps1')
-rw-r--r--tests/shells.Tests.ps113
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/shells.Tests.ps1 b/tests/shells.Tests.ps1
index 1c4df7b..184014b 100644
--- a/tests/shells.Tests.ps1
+++ b/tests/shells.Tests.ps1
@@ -9,11 +9,16 @@ Describe "Shells" {
function Add-ShellTest([string]$package, [string]$executable) {
$temp = New-TemporaryFile
@"
- { pkgs, config, ... }:
- {
- imports = [ ./base.nix ];
+ { pkgs, lib, config, options, ... }:
+ with lib; {
+ imports = [ ./base.nix ];
- users.users.`${config.wsl.defaultUser}.shell = pkgs.$package;
+ config = mkMerge [
+ { users.users.`${config.wsl.defaultUser}.shell = pkgs.$package; }
+ (optionalAttrs (hasAttrByPath ["programs" "$package" "enable"] options) {
+ programs.$package.enable = true;
+ })
+ ];
}
"@ > $temp
$distro.InstallConfig($temp)