Initial Bitpoll Nix package and service

This commit is contained in:
Philip Henning 2025-07-03 17:35:13 +02:00
commit 0b3e086c03
5 changed files with 898 additions and 0 deletions

42
flake.nix Normal file
View file

@ -0,0 +1,42 @@
{
description = "Bitpoll - A web application for scheduling meetings and general polling";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
bitpoll = pkgs.callPackage ./package.nix { };
in
{
packages = {
default = bitpoll;
bitpoll = bitpoll;
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
python3
python3Packages.pip
python3Packages.virtualenv
postgresql
uwsgi
];
shellHook = ''
echo "Bitpoll development environment"
echo "Run 'nix build' to build the package"
echo "Run 'nixos-rebuild switch --flake .#' to deploy the service"
'';
};
}
) // {
nixosModules = {
default = import ./module.nix;
bitpoll = import ./module.nix;
};
};
}