From d672867ffd033754cab6e4028073aa9074e6026c Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Mon, 1 Nov 2021 19:55:01 +0100 Subject: [PATCH] change flake output --- README.org | 4 ++-- flake.nix | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.org b/README.org index 395ed28..ae78fab 100644 --- a/README.org +++ b/README.org @@ -14,11 +14,11 @@ This is just one HTML file, grab the =index.html= and open it in your favourite browser or host it with whatever webserver you like. This web page is also available as [[https://nixos.wiki/wiki/Flakes][Nix Flake]]. - The =index.html= file is provided in =/var/www/socialize= of the flake output. + The =index.html= file is provided in the root of the flake package output. To use it for example with Nginx, the flakes (here included as =socialize=) content can be accessed like this: #+begin_example nix - services.nginx.virtualHosts."example.org".locations."/".root = "${socialize.packages."".socialize}/var/www/socialize"; + services.nginx.virtualHosts."example.org".locations."/".root = "${socialize.packages."".socialize}"; #+end_example *** Requirements diff --git a/flake.nix b/flake.nix index 3e98675..bca2cc4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,28 +1,22 @@ { description = "socialize web page"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { - - # Package packages.socialize = pkgs.stdenv.mkDerivation { name = "socialize"; src = self; installPhase = '' - install -m 444 -D index.html $out/var/www/socialize/index.html + install -m 444 -D index.html $out/index.html ''; }; defaultPackage = self.packages.${system}.socialize; } - ); }