From a0af28e304a208b5c3855134a371cd8977df9a18 Mon Sep 17 00:00:00 2001 From: Victor Hang Date: Sun, 29 Sep 2024 17:51:15 +0200 Subject: [PATCH] =?UTF-8?q?feat=20=E2=9C=A8:=20add=20build=20totoro/anya/n?= =?UTF-8?q?ishinoya=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Victor Hang --- .github/workflows/build-anya.yaml | 85 ++++++++++++++++++++++++++ .github/workflows/build-nishinoya.yaml | 85 ++++++++++++++++++++++++++ .github/workflows/build-totoro.yaml | 85 ++++++++++++++++++++++++++ .gitignore | 1 + base.nix | 1 + homeManagerModules/fontConfig.nix | 7 ++- homeManagerModules/stylixConfig.nix | 7 ++- 7 files changed, 269 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build-anya.yaml create mode 100644 .github/workflows/build-nishinoya.yaml create mode 100644 .github/workflows/build-totoro.yaml diff --git a/.github/workflows/build-anya.yaml b/.github/workflows/build-anya.yaml new file mode 100644 index 0000000..218a621 --- /dev/null +++ b/.github/workflows/build-anya.yaml @@ -0,0 +1,85 @@ +name: Build Anya +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 + with: + nix_path: nixpkgs=channel:nixos-24.05 + - uses: cachix/cachix-action@v15 + with: + name: didactiklabs + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Checkout code + uses: actions/checkout@v3 + - name: Create /etc/nixos and copy hardware config + run: | + sudo mkdir -p /etc/nixos + sudo sh -c 'cat > /etc/nixos/hardware-configuration.nix <' -A config.system.build.toplevel -I nixos-config=profiles/anya/configuration.nix + - name: Push + # if: github.ref == 'refs/heads/main' + run: | + cachix push didactiklabs ./result diff --git a/.github/workflows/build-nishinoya.yaml b/.github/workflows/build-nishinoya.yaml new file mode 100644 index 0000000..5c3fbe5 --- /dev/null +++ b/.github/workflows/build-nishinoya.yaml @@ -0,0 +1,85 @@ +name: Build Nishinoya +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 + with: + nix_path: nixpkgs=channel:nixos-24.05 + - uses: cachix/cachix-action@v15 + with: + name: didactiklabs + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Checkout code + uses: actions/checkout@v3 + - name: Create /etc/nixos and copy hardware config + run: | + sudo mkdir -p /etc/nixos + sudo sh -c 'cat > /etc/nixos/hardware-configuration.nix <' -A config.system.build.toplevel -I nixos-config=profiles/nishinoya/configuration.nix + - name: Push + # if: github.ref == 'refs/heads/main' + run: | + cachix push didactiklabs ./result diff --git a/.github/workflows/build-totoro.yaml b/.github/workflows/build-totoro.yaml new file mode 100644 index 0000000..a4e884b --- /dev/null +++ b/.github/workflows/build-totoro.yaml @@ -0,0 +1,85 @@ +name: Build Totoro +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 + with: + nix_path: nixpkgs=channel:nixos-24.05 + - uses: cachix/cachix-action@v15 + with: + name: didactiklabs + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Checkout code + uses: actions/checkout@v3 + - name: Create /etc/nixos and copy hardware config + run: | + sudo mkdir -p /etc/nixos + sudo sh -c 'cat > /etc/nixos/hardware-configuration.nix <' -A config.system.build.toplevel -I nixos-config=profiles/totoro/configuration.nix + - name: Push + # if: github.ref == 'refs/heads/main' + run: | + cachix push didactiklabs ./result diff --git a/.gitignore b/.gitignore index fa67c9f..0bec08c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .env .swp hardware-configuration.nix +result diff --git a/base.nix b/base.nix index 8e3d14c..89e897e 100644 --- a/base.nix +++ b/base.nix @@ -198,6 +198,7 @@ in "nix-command" "flakes" ]; + substituters = [ "https://didactiklabs.cachix.org" ]; }; }; programs = { diff --git a/homeManagerModules/fontConfig.nix b/homeManagerModules/fontConfig.nix index 85f97ca..ee8eee4 100644 --- a/homeManagerModules/fontConfig.nix +++ b/homeManagerModules/fontConfig.nix @@ -23,7 +23,12 @@ in # cf https://nixos.wiki/wiki/Fonts fonts.fontconfig.enable = true; home.packages = [ - pkgs.nerdfonts + (pkgs.nerdfonts.override { + fonts = [ + "FiraCode" + "Hack" + ]; + }) pkgs.font-awesome ]; }; diff --git a/homeManagerModules/stylixConfig.nix b/homeManagerModules/stylixConfig.nix index 1cc214a..6f95c64 100644 --- a/homeManagerModules/stylixConfig.nix +++ b/homeManagerModules/stylixConfig.nix @@ -11,7 +11,12 @@ }; fonts.monospace = { name = "Hack Nerd Font"; - package = pkgs.nerdfonts; + package = pkgs.nerdfonts.override { + fonts = [ + "FiraCode" + "Hack" + ]; + }; }; }; };