Compare commits

...

23 Commits

Author SHA1 Message Date
9d5b2ac88f revert 5c12d64623b519b324c404aab067b97da0e6339e
revert Modified overlay to force use of flutter319
2025-08-28 19:10:24 -04:00
51564ed7fa Updated flake lock file 2025-08-28 18:30:33 -04:00
3c7f439ba6 Renamed flutter argument 2025-08-28 18:29:30 -04:00
5c12d64623 Modified overlay to force use of flutter319 2025-08-23 12:17:14 -04:00
5087b872b7 Updated flake inputs 2025-08-23 09:51:35 -04:00
aa201c643f Refactored and updated
- Replaced chromium with ungoogled-chromium
- Replaced lxqt with openbox
2025-08-23 09:49:18 -04:00
ff5897a40c Help target now shows up with 'make' command 2025-08-23 09:46:00 -04:00
7172641ab4 Updated flake inputs
- nix
- nix/nixpkgs
- nixpkgs
2025-08-20 16:03:46 -04:00
d7d164291d Added gitignore file 2025-08-15 19:18:04 -04:00
db62676282 Added flake description and nixosConfigurations.vm ouput
nixosConfigurations.vm to be used to test invoiceninja-desktop in a VM
2025-08-15 18:02:50 -04:00
c4dc6ed971 invoiceninja-desktop package now properly added to environment.systemPackages 2025-08-15 17:58:25 -04:00
f59831b946 Added EditorConfig to repo 2025-08-15 17:56:26 -04:00
49fa5d7f63 Makefile: added Makefile for testing 2025-08-14 17:32:56 -04:00
29c012a492 vm/default.nix: added virtual machine configuration for testing 2025-08-14 17:32:19 -04:00
d7b203ad6c flake.lock: reverted nixpkgs version 2025-08-13 16:14:04 -04:00
b27b06ec06 package.nix: reverted flutter version 2025-08-13 16:12:23 -04:00
d7f781bb84 package.nix: reverted package version 2025-08-08 20:20:01 -04:00
29b11bee5a package.nix: update flutter version 2025-08-08 18:40:11 -04:00
8b2fd7b95e package.nix: updated package version, updated flutter version 2025-08-08 18:33:25 -04:00
1720c2c8b0 package.nix: fixed postInstall phase 2025-01-01 15:59:19 -05:00
f0630c4a63 package.nix: fixed pname 2025-01-01 15:23:48 -05:00
1e336db1a9 package.nix: added desktop menu entry 2025-01-01 15:22:49 -05:00
92b7216c0b flake.nix: changed package name to 'invoiceninja-desktop' 2025-01-01 12:31:46 -05:00
7 changed files with 176 additions and 34 deletions

15
.editorconfig Normal file
View File

@ -0,0 +1,15 @@
# 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 Normal file
View File

@ -0,0 +1,2 @@
result

51
Makefile Normal file
View File

@ -0,0 +1,51 @@
####
# 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
View File

@ -78,11 +78,11 @@
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1735677698,
"narHash": "sha256-L0G5igB2xXUQwKhU5aRfRtrhDJfJ3PkOUcvXnQM2+kI=",
"lastModified": 1756415448,
"narHash": "sha256-eHMAXHdP9RGwQkAC+/ealzq5VPp/A5vkGXf6tBoGkTo=",
"owner": "NixOS",
"repo": "nix",
"rev": "4f3960ea260f95a36a204d0d57d60ead66c3b194",
"rev": "47cae1f72bd1217623ca549f1743798c83accb78",
"type": "github"
},
"original": {
@ -92,16 +92,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1734359947,
"narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=",
"lastModified": 1756178832,
"narHash": "sha256-O2CIn7HjZwEGqBrwu9EU76zlmA5dbmna7jL1XUmAId8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a",
"rev": "d98ce345cdab58477ca61855540999c86577d19d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.11",
"ref": "nixos-25.05-small",
"repo": "nixpkgs",
"type": "github"
}
@ -140,11 +140,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1735531152,
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
"lastModified": 1751274312,
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
"type": "github"
},
"original": {

View File

@ -1,4 +1,6 @@
{
description = "Invoice Ninja desktop package.";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
outputs =
@ -18,11 +20,16 @@
);
in
rec {
overlays.default = final: prev: { invoice-ninja-desktop = final.callPackage ./package.nix { }; };
nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
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;
default = pkgsBySystem.${system}.invoice-ninja-desktop;
invoiceninja-desktop = pkgsBySystem.${system}.invoiceninja-desktop;
default = pkgsBySystem.${system}.invoiceninja-desktop;
});
};
}

View File

@ -1,6 +1,26 @@
{ lib, fetchFromGitHub, flutter319 }:
{ lib
, makeDesktopItem
, copyDesktopItems
, wrapGAppsHook3
, fetchFromGitHub
, flutter
}:
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";
src = fetchFromGitHub {
@ -10,10 +30,7 @@ let
hash = "sha256-yYGGmF0XiixDi/OuLdlKwN685BUsxcIFzIqXkJi4KMs=";
};
in flutter319.buildFlutterApplication {
inherit version src;
pname = "invoice-ninja-desktop";
pname = "invoiceninja-desktop";
targetFlutterPlatform = "linux";
@ -29,10 +46,22 @@ in flutter319.buildFlutterApplication {
super_text_layout = "sha256-SGWTs2zHObYAC8J/LdtdmoDtI/EQZr0fJoYMpGcyGWE=";
};
nativeBuildInputs = [
copyDesktopItems
wrapGAppsHook3
];
postUnpack = ''
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 = {
description = "Invoice Ninja desktop client";
homepage = "https://github.com/invoiceninja/admin-portal";

38
vm/default.nix Normal file
View File

@ -0,0 +1,38 @@
{ 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
];
}