Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Add a test for the home-manager module #901

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

traxys
Copy link
Member

@traxys traxys commented Jan 6, 2024

No description provided.

@traxys traxys requested a review from GaetanLepage January 6, 2024 11:23
@traxys traxys force-pushed the home-manager-check branch from e4bbb2b to f447ee1 Compare January 6, 2024 11:33
Comment on lines 1 to 30
#!/usr/bin/env -S nix run 'github:clhodapp/nix-runner/7b56158f7ab9fd7806068c6571833210e063df19' --
#!package nixpkgs#bash
#!package nixpkgs#home-manager
#!command bash

self=$(realpath "$(dirname "$0")")

systems=(
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
)

failures=()

ok=true

echo "=== HOME MANAGER ==="
for system in "${systems[@]}"; do
if ! home-manager --no-write-lock-file build --flake ${self}/home-manager#nixvim-${system}; then
failures+=("home-manager-${system}")
ok=false
fi
done

if [[ $ok = false ]]; then
echo -e "\nFAILURES: ${failures[@]}"
exit 1
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we make a derivation out of this ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried, but was not able because home-manager was not able to find the nix profile directory for the user, which seems coherent as I don't think that in derivations a full nix environement exists

@GaetanLepage
Copy link
Member

I think that you have to rebase on main

@traxys traxys force-pushed the home-manager-check branch 2 times, most recently from c78ecf1 to 8d1336b Compare January 6, 2024 16:15
@traxys traxys force-pushed the home-manager-check branch from 8d1336b to a537fde Compare January 6, 2024 16:15
Copy link
Member

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing !

@traxys traxys merged commit 96cdbc8 into nix-community:main Jan 6, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants