init new template
This commit is contained in:
parent
0a891d836e
commit
ad63f6f0df
4 changed files with 92 additions and 1 deletions
65
flake.nix
Normal file
65
flake.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
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-heinrichmalerbetrieb;
|
||||
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;
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue