From 6b404b275b79e0eaa07aa34ebecd2073629e214f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sat, 11 Jun 2022 13:32:09 +0100 Subject: [PATCH] initial commit --- .envrc | 1 + .github/workflows/update-flake.yaml | 24 +++++++++++++++++ .gitignore | 1 + README.md | 2 ++ flake.lock | 42 +++++++++++++++++++++++++++++ flake.nix | 27 +++++++++++++++++++ 6 files changed, 97 insertions(+) create mode 100644 .envrc create mode 100644 .github/workflows/update-flake.yaml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.github/workflows/update-flake.yaml b/.github/workflows/update-flake.yaml new file mode 100644 index 0000000..1a5c165 --- /dev/null +++ b/.github/workflows/update-flake.yaml @@ -0,0 +1,24 @@ +name: update-flake-lock +on: + workflow_dispatch: # allows manual triggering + schedule: + - cron: "31 3 * * 3" +jobs: + lockfile: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Nix + uses: cachix/install-nix-action@v17 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Update flake.lock + uses: DeterminateSystems/update-flake-lock@v9 + with: + pr-title: "Update flake.lock" # Title of PR to be created + pr-labels: | # Labels to be set on the PR + dependencies + automated + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92b2793 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv diff --git a/README.md b/README.md new file mode 100644 index 0000000..92811f5 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Various nix packages that I use + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9dae702 --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1654948247, + "narHash": "sha256-QCrcW0H15lwGf7xrk2N+Oj9Bw/5YE2/JL2fWUdWRXf8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f8284756368b763e7e765f35b6305322c3d14599", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e5a8375 --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "Lotteā€™s nix packages"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem ( + system: let + pkgs = import nixpkgs {inherit system;}; + in { + formatter = pkgs.alejandra; + + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + statix + ]; + }; + } + ); +}