hacking
This commit is contained in:
parent
9c325e70a8
commit
af673c6fa2
3 changed files with 366 additions and 1 deletions
66
flake.nix
Normal file
66
flake.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
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 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.overrideAttrs (oldAttrs: rec {
|
||||
postInstall = oldAttrs.postInstall + ''
|
||||
rm -r $out/${pkgs.python3.sitePackages}/froide_govplan/templates/froide_govplan
|
||||
ln -sf /var/lib/froide-govplan/template $out/${pkgs.python3.sitePackages}/froide_govplan/templates/froide_govplan
|
||||
'';
|
||||
});
|
||||
})
|
||||
];
|
||||
};
|
||||
modules = [
|
||||
({ lib, config, pkgs, ... }: {
|
||||
|
||||
virtualisation = {
|
||||
memorySize = 8000;
|
||||
diskSize = 4096;
|
||||
cores = 4;
|
||||
};
|
||||
|
||||
services.froide-govplan = {
|
||||
enable = true;
|
||||
settings = {
|
||||
DEBUG = lib.mkForce true;
|
||||
CSRF_TRUSTED_ORIGINS = [ "http://localhost:8080" ];
|
||||
};
|
||||
};
|
||||
|
||||
nixos-shell.mounts.extraMounts = {
|
||||
"/var/lib/froide-govplan/template" = {
|
||||
target = /home/onny/projects/froide-govplan/froide_govplan/templates/froide_govplan;
|
||||
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