{ description = "Invoiceplane invoice template development shell"; inputs.nixpkgs.url = "nixpkgs/nixos-24.11"; 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: { invoiceplane = super.invoiceplane.overrideAttrs (oldAttrs: rec { installPhase = oldAttrs.installPhase + '' rm -r $out/application/views/invoice_templates/pdf ln -sf /var/lib/invoiceplane/localhost/pdf $out/application/views/invoice_templates/pdf ''; }); }) ]; }; modules = [ ({ lib, config, pkgs, ... }: { services.invoiceplane.sites."localhost" = { enable = true; settings.IP_URL = "http://localhost:8080"; }; nixos-shell.mounts.extraMounts = { "/var/lib/invoiceplane/localhost/pdf" = { target = /home/onny/projects/invoiceplane-vtdirektmarketing; cache = "none"; }; }; system.stateVersion = "24.11"; services.getty.autologinUser = "root"; documentation = { info.enable = false; man.enable = false; nixos.enable = false; }; nix = { registry.nixpkgs.flake = inputs.nixpkgs; settings.experimental-features = [ "nix-command" "flakes" ]; }; }) ]; }; packages = { inherit start; }; defaultPackage.x86_64-linux = start; }; }