From 666ffe8543fc6ef86be384c7f652d80c41935996 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 12 Apr 2023 17:50:32 +0200 Subject: Use flakes and `nix develop` --- .envrc | 1 + .gitignore | 3 ++- config.toml | 6 +++--- flake.lock | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 20 ++++++++++++++++++++ 5 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 .envrc 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/.gitignore b/.gitignore index a959665..0a351ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /public/ +.direnv # Local Netlify folder -.netlify \ No newline at end of file +.netlify diff --git a/config.toml b/config.toml index 9f2179b..e0a4d8a 100644 --- a/config.toml +++ b/config.toml @@ -40,12 +40,12 @@ author_image = "/img/me-thumb.jpg" name = "alan@alanpearce.eu" url = "mailto:alan@alanpearce.eu" weight = 1 -[[extra.menu.contact]] - name = "GitLab" - url = "https://gitlab.com/alanpearce" [[extra.menu.contact]] name = "Codeberg" url = "https://codeberg.org/alanpearce" +[[extra.menu.contact]] + name = "GitLab" + url = "https://gitlab.com/alanpearce" [[extra.menu.contact]] name = "GitHub" url = "https://github.com/alanpearce" diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f8770ac --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1681124868, + "narHash": "sha256-B93QD0zFE6yc7R5F0bwdhY+y7s5UU9nrlhAAw1OA9mI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "21f48f0d273ef58c46b9b4c14cf5706c72a36e43", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8f31cfd --- /dev/null +++ b/flake.nix @@ -0,0 +1,20 @@ +{ + description = "My website, alanpearce.eu"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + gnugrep + git + zola + ]; + }; + }); +} -- cgit 1.4.1