From b17560cd1ca5d3ec315ff7f9027a6a6e4d5cf382 Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 31 Dec 2023 09:25:25 +0000 Subject: [PATCH] tidy imports --- flake.nix | 9 +-------- nixite/default.nix | 2 +- nixite/make-site.nix | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 202cbc8..64ca0a3 100644 --- a/flake.nix +++ b/flake.nix @@ -10,14 +10,7 @@ inherit system; }; nixite = import ./nixite/. {inherit pkgs;}; - in { - serve = nixite.serve; - mkSite = nixite.mkSite; - html = nixite.html; - elems = nixite.elems; - site = nixite.site; - md = nixite.md; - style = nixite.style; + in nixite // { packages.${system} = { default = nixite.mkSite ( diff --git a/nixite/default.nix b/nixite/default.nix index c258162..3d83062 100644 --- a/nixite/default.nix +++ b/nixite/default.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { - mkSite = import ./make-site.nix {inherit pkgs;}; + mkSite = import ./make-site.nix pkgs; serve = site: (pkgs.writeShellScriptBin "serve" '' ${pkgs.caddy}/bin/caddy file-server --root ${site} ''); diff --git a/nixite/make-site.nix b/nixite/make-site.nix index 914cabf..9f5177d 100644 --- a/nixite/make-site.nix +++ b/nixite/make-site.nix @@ -1,7 +1,7 @@ -{pkgs, ...}: raw: let +{stdenv, ...}: raw: let site = import ./site.nix; in - pkgs.stdenv.mkDerivation { + stdenv.mkDerivation { name = "site"; src = ./.; buildPhase = ''