aboutsummaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix54
1 files changed, 22 insertions, 32 deletions
diff --git a/flake.nix b/flake.nix
index 0c21a28..5dcb756 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,26 +1,26 @@
{
- description = "My personal website";
+ description = "adbjesus.com website";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-23.05";
};
-
- flake-utils = {
- url = "github:numtide/flake-utils";
- };
};
- outputs = { self, nixpkgs, flake-utils }:
- flake-utils.lib.eachDefaultSystem (system:
- let
- pkgs = import nixpkgs { inherit system; };
- in rec {
- packages.website = pkgs.stdenv.mkDerivation {
- name = "website";
- src = self;
-
- buildInputs = [ pkgs.zola ];
+ outputs = { self, nixpkgs }:
+ let
+ systems = [ "x86_64-linux" ];
+ forAllSystems = function:
+ nixpkgs.lib.genAttrs systems (system: function nixpkgs.legacyPackages.${system});
+ 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
@@ -32,24 +32,14 @@
'';
};
- packages.default = self.packages.${system}.website;
-
- apps.default = flake-utils.lib.mkApp {
- drv = pkgs.writeShellApplication {
- name = "serve";
+ default = self.packages.${system}.adbjesus-website;
+ });
- runtimeInputs = [ pkgs.zola ];
-
- text = ''
- zola serve
- '';
- };
- };
-
- devShells.default = pkgs.mkShell {
- inputsFrom = [ self.packages.${system}.website ];
+ devShells = nixpkgs.lib.genAttrs systems (system: {
+ default = nixpkgs.legacyPackages.${system}.mkShell {
+ inputsFrom = [ self.packages.${system}.adbjesus-website ];
};
- }
- );
+ });
+ };
}