timhae / firefly

14 stars 3 forks source link

pkgs.firefly-iii missing #40

Closed charmoniumQ closed 9 months ago

charmoniumQ commented 9 months ago

I'm trying to import this module in a NixOS configuration, but I get this error:

nix build
error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'nixos-vm'
         whose name attribute is located at /nix/store/gmdhl9qfaic5765lxw2wj6hb2ifjmhjd-source/pkgs/stdenv/generic/make-derivation.nix:270:7

       … while evaluating attribute 'buildCommand' of derivation 'nixos-vm'

         at /nix/store/gmdhl9qfaic5765lxw2wj6hb2ifjmhjd-source/pkgs/build-support/trivial-builders.nix:81:14:

           80|       enableParallelBuilding = true;
           81|       inherit buildCommand name;
             |              ^
           82|       passAsFile = [ "buildCommand" ]

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'firefly-iii' missing

       at /nix/store/wq9ac9kpjn912fzxrryahqwqnacd0wkh-source/module/firefly-iii.nix:13:17:

           12|
           13|   firefly-iii = pkgs.firefly-iii.override {
             |                 ^
           14|     dataDir = cfg.dataDir;
timhae commented 9 months ago

You will also have to add the overlay, I included it in the readme. Thanks for letting me know. This should work:

{
  inputs.firefly.url = "github:timhae/firefly";
  inputs.firefly.inputs.nixpkgs.follows = "nixos";
  inputs.nixos.url = "github:NixOS/nixpkgs/nixos-22.11";
  outputs = { self, nixos, firefly }: {
    nixosConfigurations.myMachine = nixos.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        firefly.nixosModules.firefly-iii
        {
          nixpkgs.overlays = [
            firefly.overlays.default
          ];
          services.firefly-iii = {
            enable = true;
            appKeyFile = "/etc/firefly-iii/appkey";
          };
        }
      ];
    };
    packages."x86_64-linux".default = self.nixosConfigurations.myMachine.config.system.build.vm;
  };
}

will update once I have better internet