feat: added deployment flow

This commit is contained in:
Leyla Becker 2026-02-11 15:16:35 -06:00
parent af43876fcb
commit f0a030c44a
5 changed files with 186 additions and 2 deletions

View file

@ -1,5 +1,5 @@
{
description = "A Nix-flake-based Node.js development environment";
description = "Volpe Blog";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
@ -19,9 +19,39 @@
pkgs = import nixpkgs {inherit overlays system;};
});
in {
packages = forEachSupportedSystem ({pkgs}: {
default = pkgs.callPackage ./nix/package.nix {};
volpe = pkgs.callPackage ./nix/package.nix {};
});
devShells = forEachSupportedSystem ({pkgs}: {
default = pkgs.mkShell {
packages = with pkgs; [node2nix nodejs pnpm sqlite];
packages = with pkgs; [
nodejs
nodePackages.pnpm
];
};
});
nixosConfigurations.volpe = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{nixpkgs.overlays = overlays;}
./nix/configuration.nix
];
};
# 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.180..."
nixos-rebuild switch --flake .#volpe \
--target-host cyberian@69.61.19.180 \
--sudo
'');
};
});
};