diff options
| author | Franck Cuny <franck@fcuny.net> | 2022-05-10 17:56:40 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2022-05-10 17:57:41 -0700 |
| commit | 1270dbff9ca7f13900d8ab0ce0011aa626029623 (patch) | |
| tree | f554ac5f81be34b6c0f24a2523612151036ac049 /flake.nix | |
| parent | static: add my resume as a static page (diff) | |
| download | fcuny.net-1270dbff9ca7f13900d8ab0ce0011aa626029623.tar.gz | |
add drone configuration and cleanup nix
Add a drone configuration to run the deploy on a push to the main
branch.
Cleanup the nix configuration to only keep support for `nix run` (which
will run the hugo server).
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 32 |
1 files changed, 18 insertions, 14 deletions
@@ -1,19 +1,23 @@ { description = "Franck Cuny's personal website."; - inputs = { nixpkgs.url = "github:nixos/nixpkgs"; }; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; - outputs = { self, nixpkgs }: - let pkgs = nixpkgs.legacyPackages.x86_64-linux; - in { - defaultApp.x86_64-linux = self.apps.server; - apps.server = pkgs.writers.writeBashBin "server" '' - set -e - set -o pipefail - PATH=${pkgs.lib.makeBinPath [ pkgs.hugo pkgs.git ]} - hugo server - ''; - devShell.x86_64-linux = - pkgs.mkShell { buildInputs = with pkgs; [ hugo flyctl git ]; }; - }; + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + defaultApp = pkgs.writers.writeBashBin "run-hugo" '' + set -e + set -o pipefail + export PATH=${pkgs.lib.makeBinPath [ pkgs.hugo pkgs.git ]} + hugo server -D + ''; + + devShell = + pkgs.mkShell { buildInputs = with pkgs; [ hugo flyctl git ]; }; + }); } |
