nixos: fix setups where users.users.<id>.name is not <id>
#566
This file contains hidden or 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: CI | |
| on: [push, pull_request, merge_group] | |
| jobs: | |
| nix_parsing: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| - name: Check Nix parsing | |
| run: | | |
| find . -name "*.nix" -exec nix-instantiate --parse --quiet {} >/dev/null + | |
| nix_formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Check Nix formatting | |
| run: | | |
| nix-shell -p nixpkgs-fmt --run "nixpkgs-fmt --check ." | |
| shell_formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Check shell script formatting | |
| run: | | |
| find . -name "*.*sh" -exec nix-shell -p shfmt --run "shfmt -i 4 -d {}" \; | |
| shell_error_checking: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Check for shell script errors | |
| run: | | |
| find . -name "*.*sh" -exec nix-shell -p shellcheck --run "shellcheck {}" \; | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| enable_kvm: true | |
| extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm" | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Flake checks, NixOS tests | |
| run: | | |
| nix flake check -L |