add subsites
This commit is contained in:
parent
aa8d467b1a
commit
eee8494001
12 changed files with 321 additions and 99 deletions
85
flake.nix
85
flake.nix
|
|
@ -1,85 +0,0 @@
|
|||
{
|
||||
description = "Invoiceplane invoice template development shell";
|
||||
|
||||
inputs.nixpkgs.url = "nixpkgs/master";
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
start =
|
||||
pkgs.writeShellScriptBin "start" ''
|
||||
set -e
|
||||
export NIXPKGS_ALLOW_INSECURE=1
|
||||
export QEMU_NET_OPTS="hostfwd=tcp::8080-:80"
|
||||
${pkgs.nixos-shell}/bin/nixos-shell --flake .
|
||||
'';
|
||||
in {
|
||||
nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
pkgs = import nixpkgs {
|
||||
overlays = [
|
||||
(self: super: {
|
||||
froide-govplan = super.froide-govplan.overridePythonAttrs (oldAttrs: rec {
|
||||
src = ./.;
|
||||
#pkgs.fetchFromGitHub {
|
||||
# owner = "onny";
|
||||
# repo = "froide-govplan";
|
||||
# rev = "81697ce37cfdee7b5d0f667c50b13062ed9786c3";
|
||||
# hash = "sha256-ooHGlCKgZL+TMh6OtopKtbkV0MhT4udLCOIC+C3Ytdw=";
|
||||
#};
|
||||
|
||||
dependencies = oldAttrs.dependencies ++ [ oldAttrs.passthru.python.pkgs.mastodon-py ];
|
||||
|
||||
postInstall = oldAttrs.postInstall + ''
|
||||
rm -r $out/${pkgs.python3.sitePackages}/froide_govplan/templates
|
||||
ln -sf /var/lib/froide-govplan/templates $out/${pkgs.python3.sitePackages}/froide_govplan/templates
|
||||
cp -r froide_govplan/static $out/${pkgs.python3.sitePackages}/froide_govplan/
|
||||
'';
|
||||
});
|
||||
})
|
||||
];
|
||||
};
|
||||
modules = [
|
||||
({ lib, config, pkgs, ... }: {
|
||||
|
||||
virtualisation = {
|
||||
memorySize = 8000;
|
||||
diskSize = 4096;
|
||||
cores = 4;
|
||||
};
|
||||
|
||||
disabledModules = [ "services/web-apps/froide-govplan.nix" ];
|
||||
|
||||
imports = [ ./froide-govplan.nix ];
|
||||
|
||||
services.froide-govplan = {
|
||||
enable = true;
|
||||
package = pkgs.froide-govplan;
|
||||
settings = {
|
||||
DEBUG = lib.mkForce true;
|
||||
CSRF_TRUSTED_ORIGINS = [ "http://localhost:8080" ];
|
||||
MASTODON_ACCESS_TOKEN = "WvUND5mp_tPQ9dgMrKWVXpUbP2gKpxRD3ejg10z74pg";
|
||||
MASTODON_API_BASE_URL = "https://social.project-insanity.org";
|
||||
};
|
||||
};
|
||||
|
||||
nixos-shell.mounts.extraMounts = {
|
||||
"/var/lib/froide-govplan/templates" = {
|
||||
target = /home/onny/projects/froide-govplan/froide_govplan/templates;
|
||||
cache = "none";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
services.getty.autologinUser = "root";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
packages = { inherit start; };
|
||||
defaultPackage.x86_64-linux = start;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue