Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use nix
use flake
21 changes: 12 additions & 9 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Check Codebase"
name: "Check, Test and Build Codebase"

on:
pull_request:
Expand All @@ -12,14 +12,17 @@ jobs:
- name: "Checkout Codebase"
uses: "actions/checkout@v4"

- name: "Install nix"
uses: "cachix/install-nix-action@v25"
with:
nix_path: "nixpkgs=channel:nixos-24.05"
- name: "Install Nix"
uses: "DeterminateSystems/nix-installer-action@v17"

- name: "Use magic Nix cache"
uses: "DeterminateSystems/magic-nix-cache-action@v4"
- name: "Check, Test and Build"
run: |
nix develop --command bash -c "cabal update --ignore-project && cabal dev-test-build"

- name: "Build Docker Image"
run: |
nix build .#docker

- name: "Check Application"
- name: "Load Docker Image"
run: |
nix-shell --run "dev-test-build"
docker load <./result
17 changes: 4 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,20 @@ jobs:
steps:
- id: "release"
name: "Release"
uses: "google-github-actions/release-please-action@v4"
uses: "googleapis/release-please-action@v4"

- name: "Checkout Codebase"
if: "${{ steps.release.outputs.release_created }}"
uses: "actions/checkout@v4"
with:
fetch-depth: 0

- name: "Install nix"
- name: "Install Nix"
if: "${{ steps.release.outputs.release_created }}"
uses: "cachix/install-nix-action@v25"
with:
nix_path: "nixpkgs=channel:nixos-24.05"
extra_nix_config: "system-features = benchmark, big-parallel, nixos-test, uid-range, kvm"

- name: "Use magic Nix cache"
if: "${{ steps.release.outputs.release_created }}"
uses: "DeterminateSystems/magic-nix-cache-action@v4"
uses: "DeterminateSystems/nix-installer-action@v17"

- name: "Build Statically Compiled Executable"
if: "${{ steps.release.outputs.release_created }}"
run: |
nix-shell --run "bash build-static.sh"
nix develop --command bash build-static.sh

- name: "Upload Release Artifact"
if: "${{ steps.release.outputs.release_created }}"
Expand Down
28 changes: 2 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,34 +80,10 @@ secrets:
> If 1Password is used, 1Password CLI application (`op`) must be on
> `PATH` when running `opsops`.

### Using `nix-env`

```sh
nix-env --install --file https://github.com/vst/opsops/archive/main.tar.gz --attr app
```

### Using `nix-profile`

```sh
nix profile install --file https://github.com/vst/opsops/archive/main.tar.gz app
```

### Using `niv`

```sh
niv add vst/opsops -n opsops
nix profile install --file https://github.com/vst/opsops/archive/main.tar.gz
```

... and then:

```sh
sources = import ./nix/sources.nix;
opsops = (import sources.opsops { }).app;
```

... and finally add `opsops` to your system packages, home packages or
Nix shell build inputs.

## Usage

### Specification
Expand Down Expand Up @@ -333,7 +309,7 @@ hpack &&
To check and build:

```sh
dev-test-build
cabal dev-test-build [-c]
```

## License
Expand Down
2 changes: 1 addition & 1 deletion build-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## `--enable-executable-stripping`, hence the `strip` command usage.

## GHC version:
GHC_VERSION="9.4.8"
GHC_VERSION="9.6.6"

## Docker image:
DOCKER_IMAGE="quay.io/benz0li/ghc-musl:${GHC_VERSION}"
Expand Down
133 changes: 0 additions & 133 deletions default.nix

This file was deleted.

61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading