This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
55 lines (55 loc) · 1.91 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
description = "'Firefly III' is a (self-hosted) manager for your personal finances";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
firefly-iii-src = {
url = "github:firefly-iii/firefly-iii/v6.1.10";
flake = false;
};
composer2nix-src = {
url = "github:svanderburg/composer2nix/v0.0.6";
flake = false;
};
};
outputs = { self, nixpkgs, firefly-iii-src, composer2nix-src }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlays.default ]; });
version = builtins.substring 0 8 self.lastModifiedDate;
in
{
overlays.default = final: _: {
firefly-iii = with final; callPackage ./pkgs/default.nix {
inherit version;
src = firefly-iii-src;
};
composer2nix = with final; callPackage (composer2nix-src.outPath + "/default.nix") { };
};
packages = forAllSystems (system:
{
inherit (nixpkgsFor.${system}) firefly-iii composer2nix;
default = nixpkgsFor.${system}.firefly-iii;
}
);
nixosModules.firefly-iii = import ./module/firefly-iii.nix nixpkgs;
checks = forAllSystems (system:
self.packages.${system} // import ./checks/firefly-iii.nix { inherit self nixpkgs system; }
);
formatter = forAllSystems (system: nixpkgsFor.${system}.nixpkgs-fmt);
devShells = forAllSystems (system: {
default = nixpkgsFor.${system}.mkShellNoCC {
packages = with nixpkgsFor.${system}; [
self.packages.${system}.composer2nix
curl
jq
nil
nixpkgs-fmt
nodePackages.bash-language-server
nodePackages.yaml-language-server
ripgrep
];
};
});
};
}