Fix CI: change root to env HOME - 1 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: push | |
jobs: | |
install: | |
name: install-nix-home-manager | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update package | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl | |
- name: Create nix configuration | |
run: | | |
sudo mkdir /etc/nix | |
echo "build-users-group = " | sudo tee /etc/nix/nix.conf > /dev/null | |
- name: Install nix and home manager | |
run: | | |
sh <(curl -L https://nixos.org/nix/install) --no-daemon | |
sleep 1 | |
. $HOME/.nix-profile/etc/profile.d/nix.sh | |
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager | |
nix-channel --add https://github.com/nix-community/nixGL/archive/main.tar.gz nixgl | |
nix-channel --update | |
nix-shell '<home-manager>' -A install | |
echo ". \"\$HOME\"/.nix-profile/etc/profile.d/nix.sh" | tee -a ~/.bashrc > /dev/null | |
source ~/.bashrc | |
nix --version | |
home-manager --version | |
- name: Verify home.nix file | |
run: ls -lh ~/.config/home-manager/home.nix |