{ description = "Volpe Blog"; inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; outputs = { self, nixpkgs, } @ inputs: let overlays = [ (final: prev: { nodejs = prev.nodejs_latest; }) ]; supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { pkgs = import nixpkgs {inherit overlays system;}; }); realSrc = /. + (builtins.getEnv "PWD"); in { packages = forEachSupportedSystem ({pkgs}: { default = pkgs.callPackage ./nix/package.nix { siteUrl = "https://blog.jan-leila.com"; sourcePath = realSrc; }; blog = pkgs.callPackage ./nix/package.nix { siteUrl = "https://blog.jan-leila.com"; sourcePath = realSrc; }; volpe = pkgs.callPackage ./nix/package.nix { siteUrl = "https://volpe.jan-leila.com"; sourcePath = realSrc; }; }); devShells = forEachSupportedSystem ({pkgs}: { default = pkgs.mkShell { packages = with pkgs; [ nodejs nodePackages.pnpm ]; }; }); nixosConfigurations.volpe = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ {nixpkgs.overlays = overlays;} ./nix/configuration.nix ]; specialArgs = {inherit inputs realSrc;}; }; # Deployment helper - use with: nix run .#deploy apps = forEachSupportedSystem ({pkgs}: { deploy = { type = "app"; program = toString (pkgs.writeShellScript "deploy-volpe" '' set -e echo "Building and deploying to cyberian@69.61.19.129..." nixos-rebuild switch --flake .#volpe \ --target-host cyberian@69.61.19.129 \ --sudo \ --impure ''); }; }); }; }