From 00f4b1a073e92633c20691d958815c4955fa3872 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Fri, 9 Aug 2024 12:29:32 -0700 Subject: [PATCH 1/4] Add github CI --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a0e455f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: "Build & Test (nix)" + +on: + pull_request: + push: + branches: + - master + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Run the Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Check + run: | + nix flake check \ No newline at end of file From 38b92b5f43250f00e920e93c3033a488cab12c82 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Fri, 9 Aug 2024 12:57:45 -0700 Subject: [PATCH 2/4] Add more checks --- flake.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/flake.nix b/flake.nix index b36928b..083d835 100644 --- a/flake.nix +++ b/flake.nix @@ -132,5 +132,26 @@ ]; }; }; + + nixosMachines = forAllSystems ( + system: let + # Filter the configurations to those that match the current system + matchingSystemConfigurations = nixpkgs.lib.filterAttrs (_: c: c.pkgs.system == system) self.nixosConfigurations; + + # Map each matching configuration to its top-level system derivation + toplevelDerivations = nixpkgs.lib.mapAttrs (_: c: c.activationPackage) matchingSystemConfigurations; + in + toplevelDerivations + ); + + checks = + forAllSystems ( + system: + { + } + # Add all our homemanager configurations + // (nixpkgs.lib.mapAttrs (_: c: c.config.system.build.toplevel) (nixpkgs.lib.filterAttrs (_: c: c.pkgs.system == system) self.homeConfigurations)) + ) + // self.nixosMachines; }; } From 8546098f8715d0a2377e7700fed41bda1d768a38 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Fri, 9 Aug 2024 12:58:05 -0700 Subject: [PATCH 3/4] Add more checks --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 083d835..5c82f1f 100644 --- a/flake.nix +++ b/flake.nix @@ -139,7 +139,7 @@ matchingSystemConfigurations = nixpkgs.lib.filterAttrs (_: c: c.pkgs.system == system) self.nixosConfigurations; # Map each matching configuration to its top-level system derivation - toplevelDerivations = nixpkgs.lib.mapAttrs (_: c: c.activationPackage) matchingSystemConfigurations; + toplevelDerivations = nixpkgs.lib.mapAttrs (_: c: c.config.system.build.toplevel) matchingSystemConfigurations; in toplevelDerivations ); @@ -150,7 +150,7 @@ { } # Add all our homemanager configurations - // (nixpkgs.lib.mapAttrs (_: c: c.config.system.build.toplevel) (nixpkgs.lib.filterAttrs (_: c: c.pkgs.system == system) self.homeConfigurations)) + // (nixpkgs.lib.mapAttrs (_: c: c.activationPackage) (nixpkgs.lib.filterAttrs (_: c: c.pkgs.system == system) self.homeConfigurations)) ) // self.nixosMachines; }; From 80af1678d4fee2cd91e02cd52a610d601b545f02 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Fri, 9 Aug 2024 13:23:19 -0700 Subject: [PATCH 4/4] Comment out CI --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0e455f..efa1d74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,12 @@ name: "Build & Test (nix)" -on: - pull_request: - push: - branches: - - master +# FIXME: This build is too large and runs out of space +# on github runners. +# on: +# pull_request: +# push: +# branches: +# - master jobs: build: