diff --git a/.gitignore b/.gitignore index 5ac08c2..34583dc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ abercompsoc\.github\.io\.iml /.sass-cache/ + +_site +.jekyll-cache diff --git a/README.md b/README.md index 72ff3cc..f44480b 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,19 @@ -abercompsoc.github.io -===================== +# abercompsoc.github.io -A jekell site cargo-culted from [daktilo](https://github.com/kronik3r/daktilo). +A jekyll site cargo-culted from [daktilo](https://github.com/kronik3r/daktilo). -Developing ----------- +## Developing -If you're lucky enough to be running NixOS, run: +1) Install Jekyll. For more info see the [installation guide](http://jekyllrb.com/docs/installation/). +If you're lucky enough to be running Nix, run: ```bash -$ nix-shell . --run "jekyll s" +nix develop # to use the flake +nix-shell # to use the shell.nix ``` -in this directory to generate and serve the site locally. - -If you're on another platform, you'll need to install jekyll manually, then -run: +2) Run the following command to start the Jekyll server: ```bash -$ jekyll s +jekyll s ``` - -See the [installation guide](http://jekyllrb.com/docs/installation/) for more -details on manually installing. diff --git a/default.nix b/default.nix deleted file mode 100644 index ffa6cf9..0000000 --- a/default.nix +++ /dev/null @@ -1,7 +0,0 @@ - with import {}; { - jekyllEnv = stdenv.mkDerivation { - name = "jekyll"; - # see https://github.com/NixOS/nixpkgs/issues/11564 for the nodejs dep - buildInputs = [ stdenv jekyll nodejs ]; - }; - } diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ad76f8c --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1711523803, + "narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2726f127c15a4cc9810843b96cad73c7eb39e443", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f1e628a --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = {nixpkgs, ...}: let + systems = [ + "aarch64-darwin" + "aarch64-linux" + "armv6l-linux" + "armv7l-linux" + "x86_64-darwin" + "x86_64-linux" + ]; + forEachSystem = nixpkgs.lib.genAttrs systems; + + pkgsForEach = nixpkgs.legacyPackages; + in { + devShells = forEachSystem (system: { + default = pkgsForEach.${system}.callPackage ./shell.nix {}; + }); + }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..34ddeaa --- /dev/null +++ b/shell.nix @@ -0,0 +1,4 @@ +{pkgs ? import {}}: +pkgs.mkShell { + buildInputs = with pkgs; [jekyll]; +}