diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 168a5f81..2a2abec9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,18 +6,4 @@ jobs: uses: christianharke/flake-commons/.github/workflows/nix-ci.yml@main with: branch: master - nix-ci-nixos-vm: - uses: christianharke/flake-commons/.github/workflows/nix-ci.yml@main - with: - branch: master - nix-command: build .#nixosConfigurations.nixos-vm.config.system.build.toplevel - nix-ci-non-nixos-vm-christian: - uses: christianharke/flake-commons/.github/workflows/nix-ci.yml@main - with: - branch: master - nix-command: build --impure .#homeConfigurations."christian@non-nixos-vm".activationPackage - nix-ci-non-nixos-vm-demo: - uses: christianharke/flake-commons/.github/workflows/nix-ci.yml@main - with: - branch: master - nix-command: build --impure .#homeConfigurations."demo@non-nixos-vm".activationPackage + nix-command: flake check --impure diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index d1cfcf50..fe739585 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -8,3 +8,4 @@ jobs: uses: christianharke/flake-commons/.github/workflows/nix-update.yml@main with: base-branch: master + nix-check-command: flake check --impure diff --git a/flake.nix b/flake.nix index b2935af8..07c10e66 100644 --- a/flake.nix +++ b/flake.nix @@ -109,7 +109,7 @@ rootPath = ./.; }; - inherit (nixpkgs.lib) listToAttrs; + inherit (nixpkgs.lib) listToAttrs recursiveUpdate; inherit (flakeLib) eachSystem mkHome mkNixos; in { @@ -163,27 +163,33 @@ }) ]; - checks = listToAttrs [ - (mkGeneric "pre-commit-check" (system: inputs.pre-commit-hooks.lib."${system}".run { - src = ./.; - hooks = { - nixpkgs-fmt.enable = true; - shellcheck.enable = true; - statix.enable = true; - }; - })) - - (mkCheck "shellcheck" { - script = mkShellCheck; - }) - - (mkCheck "nixpkgs-fmt" { - script = pkgs: '' - shopt -s globstar - ${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt --check ${./.}/**/*.nix - ''; - }) - ]; + checks = recursiveUpdate + (listToAttrs [ + (mkGeneric "pre-commit-check" (system: inputs.pre-commit-hooks.lib."${system}".run { + src = ./.; + hooks = { + nixpkgs-fmt.enable = true; + shellcheck.enable = true; + statix.enable = true; + }; + })) + + (mkCheck "shellcheck" { + script = mkShellCheck; + }) + + (mkCheck "nixpkgs-fmt" { + script = pkgs: '' + shopt -s globstar + ${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt --check ${./.}/**/*.nix + ''; + }) + ]) + { + "build-nixos-vm" = self.nixosConfigurations.nixos-vm.config.system.build.toplevel; + "build-demo@non-nixos-vm" = self.homeConfigurations."demo@non-nixos-vm".activationPackage; + "build-christian@non-nixos-vm" = self.homeConfigurations."christian@non-nixos-vm".activationPackage; + }; devShells = listToAttrs [ (mkDevShell "default" {