summaryrefslogblamecommitdiffstats
path: root/flake.nix
blob: e6f3b2801048874b28abc16a5ece26a0ddfde2cc (plain) (tree)
1
2
3
4
5
6
7
8
9
 
                                       


               
                                               
      

    


                                   








                                                                                 










                                     

                                                           
 


                                                                    
          

         

 
{
  description = "adbjesus.com website";

  inputs = {
    nixpkgs = {
      url = "github:nixos/nixpkgs/nixos-23.05";
    };
  };

  outputs = { self, nixpkgs }:
    let
      systems = [ "x86_64-linux" ];
    in rec {
      packages = nixpkgs.lib.genAttrs systems (system: {
        adbjesus-website = nixpkgs.legacyPackages.${system}.stdenv.mkDerivation {
          name = "adbjesus-website";
          src = ./.;

          buildInputs = with nixpkgs.legacyPackages.${system}; [
            zola
          ];

          buildPhase = ''
            zola build
          '';

          installPhase = ''
            mkdir -p $out
            cp -Tr public $out/public
          '';
        };

        default = self.packages.${system}.adbjesus-website;
      });

      devShells = nixpkgs.lib.genAttrs systems (system: {
        default = nixpkgs.legacyPackages.${system}.mkShell {
          inputsFrom = [ self.packages.${system}.adbjesus-website ];
        };
      });
    };
}