mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 09:18:35 +02:00
feat(tests): add eval tests for darwin systems
This commit is contained in:
10
outputs/aarch64-darwin/tests/home-manager/expected.nix
Normal file
10
outputs/aarch64-darwin/tests/home-manager/expected.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
myvars,
|
||||
lib,
|
||||
}: let
|
||||
username = myvars.username;
|
||||
hosts = [
|
||||
"fern"
|
||||
];
|
||||
in
|
||||
lib.genAttrs hosts (_: "/Users/${username}")
|
||||
15
outputs/aarch64-darwin/tests/home-manager/expr.nix
Normal file
15
outputs/aarch64-darwin/tests/home-manager/expr.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
myvars,
|
||||
lib,
|
||||
outputs,
|
||||
}: let
|
||||
username = myvars.username;
|
||||
hosts = [
|
||||
"fern"
|
||||
];
|
||||
in
|
||||
lib.genAttrs
|
||||
hosts
|
||||
(
|
||||
name: outputs.darwinConfigurations.${name}.config.home-manager.users.${username}.home.homeDirectory
|
||||
)
|
||||
8
outputs/aarch64-darwin/tests/hostname/expected.nix
Normal file
8
outputs/aarch64-darwin/tests/hostname/expected.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
lib,
|
||||
outputs,
|
||||
}: let
|
||||
hostsNames = builtins.attrNames outputs.darwinConfigurations;
|
||||
expected = lib.genAttrs hostsNames (name: name);
|
||||
in
|
||||
expected
|
||||
9
outputs/aarch64-darwin/tests/hostname/expr.nix
Normal file
9
outputs/aarch64-darwin/tests/hostname/expr.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
outputs,
|
||||
}:
|
||||
lib.genAttrs
|
||||
(builtins.attrNames outputs.darwinConfigurations)
|
||||
(
|
||||
name: outputs.darwinConfigurations.${name}.config.networking.hostName
|
||||
)
|
||||
Reference in New Issue
Block a user