Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 92d6795

Browse files
committed
upd flakes
1 parent 353df2b commit 92d6795

File tree

11 files changed

+375
-3602
lines changed

11 files changed

+375
-3602
lines changed

.github/workflows/ci.yaml

Lines changed: 52 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,59 @@
11
jobs:
2-
_2_push_to_cachix:
3-
name: Push to cachix
4-
runs-on: ${{ matrix.os }}
5-
steps:
6-
- name: Checkout this repo
7-
uses: actions/checkout@v3
8-
- name: Install Nix
9-
uses: cachix/install-nix-action@v18
10-
with:
11-
extra_nix_config: "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}\nsubstituters = https://cache.nixos.org/ https://cache.iog.io https://nix-community.cachix.org https://deemp.cachix.org \ntrusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8= deemp.cachix.org-1:9shDxyR2ANqEPQEEYDL/xIOnoPwxHot21L5fiZnFL18=\n"
12-
install_url: https://releases.nixos.org/nix/nix-2.11.1/install
13-
- name: Log in to Cachix
14-
uses: cachix/cachix-action@v12
15-
with:
16-
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
17-
name: ${{ secrets.CACHIX_CACHE }}
18-
- env:
19-
CACHIX_CACHE: ${{ secrets.CACHIX_CACHE }}
20-
name: Push flakes to Cachix
21-
run: nix run .#pushToCachix
22-
strategy:
23-
matrix:
24-
os:
25-
- macos-11
26-
- macos-12
27-
- ubuntu-20.04
28-
- ubuntu-22.04
29-
_3_front:
2+
_1_front:
303
name: Publish front
31-
runs-on: ubuntu-20.04
4+
runs-on: ubuntu-22.04
325
steps:
336
- name: Checkout this repo
347
uses: actions/checkout@v3
358
- name: Install Nix
36-
uses: cachix/install-nix-action@v18
9+
uses: nixbuild/nix-quick-install-action@v25
10+
with:
11+
nix_conf: |
12+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
13+
substituters = https://cache.nixos.org/ https://nix-community.cachix.org https://cache.iog.io https://deemp.cachix.org
14+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= deemp.cachix.org-1:9shDxyR2ANqEPQEEYDL/xIOnoPwxHot21L5fiZnFL18=
15+
keep-outputs = true
16+
- name: Restore and cache Nix store
17+
uses: nix-community/cache-nix-action@v1
3718
with:
38-
extra_nix_config: "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}\nsubstituters = https://cache.nixos.org/ https://cache.iog.io https://nix-community.cachix.org https://deemp.cachix.org \ntrusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8= deemp.cachix.org-1:9shDxyR2ANqEPQEEYDL/xIOnoPwxHot21L5fiZnFL18=\n"
39-
install_url: https://releases.nixos.org/nix/nix-2.11.1/install
19+
key: nix-${{ runner.os }}-front-${{ hashfiles('**/flake.nix', '**/flake.lock') }}
20+
restore-keys: |
21+
nix-${{ runner.os }}-front-${{ hashfiles('**/flake.nix', '**/flake.lock') }}
22+
nix-${{ runner.os }}-front-
4023
- name: Build
41-
run: |
24+
run: |-
25+
ROOT_DIR=$PWD
4226
cd front
27+
nix profile install .#buildGHPages
4328
nix run .#buildGHPages
29+
cd $ROOT_DIR
4430
- name: GitHub Pages action
4531
uses: peaceiris/actions-gh-pages@v3.9.0
4632
with:
4733
force_orphan: true
4834
github_token: ${{ secrets.GITHUB_TOKEN }}
4935
publish_dir: ./front/docs
50-
_4_back:
36+
_2_back:
5137
name: Publish back
52-
runs-on: ubuntu-20.04
38+
runs-on: ubuntu-22.04
5339
steps:
5440
- name: Checkout this repo
5541
uses: actions/checkout@v3
5642
- name: Install Nix
57-
uses: cachix/install-nix-action@v18
43+
uses: nixbuild/nix-quick-install-action@v25
44+
with:
45+
nix_conf: |
46+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
47+
substituters = https://cache.nixos.org/ https://nix-community.cachix.org https://cache.iog.io https://deemp.cachix.org
48+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= deemp.cachix.org-1:9shDxyR2ANqEPQEEYDL/xIOnoPwxHot21L5fiZnFL18=
49+
keep-outputs = true
50+
- name: Restore and cache Nix store
51+
uses: nix-community/cache-nix-action@v1
5852
with:
59-
extra_nix_config: "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}\nsubstituters = https://cache.nixos.org/ https://cache.iog.io https://nix-community.cachix.org https://deemp.cachix.org \ntrusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8= deemp.cachix.org-1:9shDxyR2ANqEPQEEYDL/xIOnoPwxHot21L5fiZnFL18=\n"
60-
install_url: https://releases.nixos.org/nix/nix-2.11.1/install
53+
key: nix-${{ runner.os }}-back-${{ hashfiles('**/flake.nix', '**/flake.lock') }}
54+
restore-keys: |
55+
nix-${{ runner.os }}-back-${{ hashfiles('**/flake.nix', '**/flake.lock') }}
56+
nix-${{ runner.os }}-back-
6157
- name: Log in to Heroku
6258
uses: AkhileshNS/heroku-deploy@master
6359
with:
@@ -66,9 +62,26 @@ jobs:
6662
heroku_email: ${{ secrets.HEROKU_EMAIL }}
6763
justlogin: true
6864
- name: Release app on Heroku
69-
run: |
65+
run: |-
66+
ROOT_DIR=$PWD
7067
cd back
68+
nix profile install .#herokuRelease
7169
nix run .#herokuRelease
70+
cd $ROOT_DIR
71+
_3_purge_caches:
72+
name: Purge cache
73+
needs:
74+
- _1_front
75+
- _2_back
76+
runs-on: ubuntu-22.04
77+
steps:
78+
- name: Purge cache
79+
uses: deemp/purge-cache@v1
80+
with:
81+
accessed: true
82+
created: true
83+
debug: true
84+
max-age: 172800
7285
name: Nix CI
7386
"on":
7487
pull_request: {}

back/default.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(import
2+
(
3+
let
4+
lock = (builtins.fromJSON (builtins.readFile ../flake.lock)).nodes.flakes.locked;
5+
in
6+
(
7+
import
8+
"${fetchTarball {
9+
url = "https://github.com/deemp/flakes/archive/${lock.rev}.tar.gz";
10+
sha256 = lock.narHash;
11+
}}/source-flake"
12+
).outputs.flake-compat.outPath
13+
)
14+
{ src = ./.; }
15+
).defaultNix

0 commit comments

Comments
 (0)