Compare commits
No commits in common. "master" and "v5.0.172" have entirely different histories.
@ -1,15 +0,0 @@
|
|||||||
# EditorConfig is awesome: https://EditorConfig.org
|
|
||||||
|
|
||||||
# top-most EditorConfig file
|
|
||||||
root = true
|
|
||||||
|
|
||||||
# Unix-style newlines with a newline ending every file
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
insert_final_newline = true
|
|
||||||
|
|
||||||
# nix files
|
|
||||||
[*.nix]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
result
|
|
||||||
|
|
||||||
51
Makefile
51
Makefile
@ -1,51 +0,0 @@
|
|||||||
####
|
|
||||||
# Target definitions
|
|
||||||
####
|
|
||||||
|
|
||||||
# Disable echoing of target recipe commands
|
|
||||||
# Comment this for debugging
|
|
||||||
.SILENT:
|
|
||||||
|
|
||||||
# Run target recipes in one shell invocation
|
|
||||||
.ONESHELL:
|
|
||||||
|
|
||||||
# Since all targets are phony, all targets should be listed here
|
|
||||||
# One target per line
|
|
||||||
.PHONY: boot-vm-cli \
|
|
||||||
boot-vm-gui \
|
|
||||||
build-vm \
|
|
||||||
clean \
|
|
||||||
format-nix-files \
|
|
||||||
help
|
|
||||||
|
|
||||||
help: ## Show this help message
|
|
||||||
egrep -h '\s##\s' $(MAKEFILE_LIST) \
|
|
||||||
| sort \
|
|
||||||
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
|
||||||
|
|
||||||
|
|
||||||
format-nix-files: ## Format nix files using the nixpkgs-fmt tool
|
|
||||||
find . -name "*.nix" -exec nixpkgs-fmt {} \;
|
|
||||||
|
|
||||||
clean: ## Clean build artifacts and shutdown running virtual machines
|
|
||||||
rm result > /dev/null 2>&1
|
|
||||||
rm nixos.qcow2 > /dev/null 2>&1
|
|
||||||
pkill qemu
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
build-vm: clean ## Build virtual machine for testing
|
|
||||||
nix build ".#nixosConfigurations.vm.config.system.build.vm"
|
|
||||||
|
|
||||||
boot-vm-cli: ## Run virtual machine in current terminal
|
|
||||||
QEMU_KERNEL_PARAMS=console=ttyS0 \
|
|
||||||
QEMU_NET_OPTS=hostfwd=tcp::8080-:80 \
|
|
||||||
QEMU_OPTS=-nographic \
|
|
||||||
./result/bin/run-nixos-vm
|
|
||||||
reset
|
|
||||||
|
|
||||||
boot-vm-gui: ## Run virtual machine in QEMU window
|
|
||||||
QEMU_KERNEL_PARAMS=console=ttyS0 \
|
|
||||||
QEMU_NET_OPTS=hostfwd=tcp::8080-:80 \
|
|
||||||
./result/bin/run-nixos-vm
|
|
||||||
reset
|
|
||||||
|
|
||||||
20
flake.lock
generated
20
flake.lock
generated
@ -78,11 +78,11 @@
|
|||||||
"nixpkgs-regression": "nixpkgs-regression"
|
"nixpkgs-regression": "nixpkgs-regression"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756415448,
|
"lastModified": 1735677698,
|
||||||
"narHash": "sha256-eHMAXHdP9RGwQkAC+/ealzq5VPp/A5vkGXf6tBoGkTo=",
|
"narHash": "sha256-L0G5igB2xXUQwKhU5aRfRtrhDJfJ3PkOUcvXnQM2+kI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "47cae1f72bd1217623ca549f1743798c83accb78",
|
"rev": "4f3960ea260f95a36a204d0d57d60ead66c3b194",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -92,16 +92,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756178832,
|
"lastModified": 1734359947,
|
||||||
"narHash": "sha256-O2CIn7HjZwEGqBrwu9EU76zlmA5dbmna7jL1XUmAId8=",
|
"narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d98ce345cdab58477ca61855540999c86577d19d",
|
"rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-25.05-small",
|
"ref": "release-24.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -140,11 +140,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1751274312,
|
"lastModified": 1735531152,
|
||||||
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
|
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
|
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
45
flake.nix
45
flake.nix
@ -1,35 +1,28 @@
|
|||||||
{
|
{
|
||||||
description = "Invoice Ninja desktop package.";
|
|
||||||
|
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, nixpkgs, nix, }:
|
{ self, nixpkgs, nix, }:
|
||||||
let
|
let
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
forEachSystem = nixpkgs.lib.genAttrs systems;
|
forEachSystem = nixpkgs.lib.genAttrs systems;
|
||||||
|
|
||||||
overlayList = [ self.overlays.default ];
|
overlayList = [ self.overlays.default ];
|
||||||
|
|
||||||
pkgsBySystem = forEachSystem (
|
pkgsBySystem = forEachSystem (
|
||||||
system:
|
system:
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = overlayList;
|
overlays = overlayList;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
|
overlays.default = final: prev: { invoice-ninja-desktop = final.callPackage ./package.nix { }; };
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./vm ];
|
|
||||||
};
|
|
||||||
|
|
||||||
overlays.default = final: prev: { invoiceninja-desktop = final.callPackage ./package.nix { }; };
|
packages = forEachSystem (system: {
|
||||||
|
invoice-ninja-desktop = pkgsBySystem.${system}.invoice-ninja-desktop;
|
||||||
packages = forEachSystem (system: {
|
default = pkgsBySystem.${system}.invoice-ninja-desktop;
|
||||||
invoiceninja-desktop = pkgsBySystem.${system}.invoiceninja-desktop;
|
});
|
||||||
default = pkgsBySystem.${system}.invoiceninja-desktop;
|
};
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
39
package.nix
39
package.nix
@ -1,26 +1,6 @@
|
|||||||
{ lib
|
{ lib, fetchFromGitHub, flutter319 }:
|
||||||
, makeDesktopItem
|
|
||||||
, copyDesktopItems
|
|
||||||
, wrapGAppsHook3
|
|
||||||
, fetchFromGitHub
|
|
||||||
, flutter
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
desktopFile = makeDesktopItem rec {
|
|
||||||
name = "Invoice Ninja";
|
|
||||||
desktopName = name;
|
|
||||||
exec = "invoiceninja";
|
|
||||||
icon = "invoiceninja";
|
|
||||||
startupWMClass = "invoiceninja";
|
|
||||||
categories = [ "Office" ];
|
|
||||||
terminal = false;
|
|
||||||
extraConfig = {
|
|
||||||
X-MultipleArgs = "false";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
in flutter.buildFlutterApplication rec {
|
|
||||||
version = "5.0.172";
|
version = "5.0.172";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -30,7 +10,10 @@ in flutter.buildFlutterApplication rec {
|
|||||||
hash = "sha256-yYGGmF0XiixDi/OuLdlKwN685BUsxcIFzIqXkJi4KMs=";
|
hash = "sha256-yYGGmF0XiixDi/OuLdlKwN685BUsxcIFzIqXkJi4KMs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pname = "invoiceninja-desktop";
|
in flutter319.buildFlutterApplication {
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
|
pname = "invoice-ninja-desktop";
|
||||||
|
|
||||||
targetFlutterPlatform = "linux";
|
targetFlutterPlatform = "linux";
|
||||||
|
|
||||||
@ -46,22 +29,10 @@ in flutter.buildFlutterApplication rec {
|
|||||||
super_text_layout = "sha256-SGWTs2zHObYAC8J/LdtdmoDtI/EQZr0fJoYMpGcyGWE=";
|
super_text_layout = "sha256-SGWTs2zHObYAC8J/LdtdmoDtI/EQZr0fJoYMpGcyGWE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
copyDesktopItems
|
|
||||||
wrapGAppsHook3
|
|
||||||
];
|
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
mv $sourceRoot/lib/.env.dart.example $sourceRoot/lib/.env.dart
|
mv $sourceRoot/lib/.env.dart.example $sourceRoot/lib/.env.dart
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p $out/share/icons
|
|
||||||
mv $out/app/invoiceninja-desktop/data/flutter_assets/assets/images/icon.png $out/share/icons/invoiceninja.png
|
|
||||||
'';
|
|
||||||
|
|
||||||
desktopItems = [ desktopFile ];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Invoice Ninja desktop client";
|
description = "Invoice Ninja desktop client";
|
||||||
homepage = "https://github.com/invoiceninja/admin-portal";
|
homepage = "https://github.com/invoiceninja/admin-portal";
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
{ modulesPath, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
invoiceninja-desktop = pkgs.callPackage ../package.nix { };
|
|
||||||
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
|
||||||
|
|
||||||
networking.firewall.enable = false;
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
services = {
|
|
||||||
resolved.enable = true;
|
|
||||||
|
|
||||||
xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.lightdm.enable = true;
|
|
||||||
windowManager.openbox.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.test = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
initialPassword = "test";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.ungoogled-chromium
|
|
||||||
invoiceninja-desktop
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user