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 | 2e8a5c27fb3c48cd4c32e001d4cfc4b3f051d72f (patch) | |
tree | 23115b51923bd07bf78ed462227bda7e3ce79469 /users/fcuny/blog/flake.nix | |
parent | static: add my resume as a static page (diff) | |
download | world-2e8a5c27fb3c48cd4c32e001d4cfc4b3f051d72f.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 'users/fcuny/blog/flake.nix')
-rw-r--r-- | users/fcuny/blog/flake.nix | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/users/fcuny/blog/flake.nix b/users/fcuny/blog/flake.nix index 59ef578..fa39b45 100644 --- a/users/fcuny/blog/flake.nix +++ b/users/fcuny/blog/flake.nix @@ -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 ]; }; + }); } |