Skip to content

Latest commit

 

History

History
165 lines (121 loc) · 4.64 KB

README.md

File metadata and controls

165 lines (121 loc) · 4.64 KB

affinity-nix

image

Affinity Photo, Designer, and Publisher applications packaged with nix.

Based on https://github.com/lf-/affinity-crimes and https://affinity.liz.pet/, and uses ElementalWarrior's wine.

Preamble

Tip

Add garnix as a substituter to avoid compling yourself.

The prefix is located in $XDG_DATA_HOME/affinity/ falling back to $HOME/.local/share/affinity/.

You will be prompted to provide affinity's installation exe on the first-time run, just follow the error's instructions to add the exe to your nix store and run again.

Usage Instructions

Important

You will be graphically prompted to install the application: Leave the installation path default.

Running Ad-hoc

$ nix run github:mrshmllow/affinity-nix#photo

$ nix run github:mrshmllow/affinity-nix#designer

$ nix run github:mrshmllow/affinity-nix#publisher

Installing the applications on your system (Optional)

Install with nix-profile

$ nix profile install github:mrshmllow/affinity-nix#photo

$ nix profile install github:mrshmllow/affinity-nix#designer

$ nix profile install github:mrshmllow/affinity-nix#publisher

Install on NixOS / Home Manager

Install on NixOS

The following is an example. Installing this package does not differ to installing a package from any other flake.

{
  inputs = {
    affinity-nix.url = "github:mrshmllow/affinity-nix";
    # ...
  };

  outputs = inputs @ {
    affinity-nix,
    ...
  }: {
    nixosConfigurations.my-system = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = {inherit inputs;};
      modules = [
        # ...
        {
          environment.systemPackages = [affinity-nix.packages.x86_64-linux.photo];
        }
      ];
    };
  }
}
Install with Home Manager

The following is an example. Installing this package does not differ to installing a package from any other flake.

{
  inputs = {
    affinity-nix.url = "github:mrshmllow/affinity-nix";
    # ...
  };

  outputs = inputs @ {
    affinity-nix,
    ...
  }: {
    homeConfigurations.my-user = home-manager.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages."x86_64-linux";
      extraSpecialArgs = {inherit inputs;};
      modules = [
        # ...
        {
          home.packages = [affinity-nix.packages.x86_64-linux.photo];
        }
      ];
    };
  }
}

3. Updating the applications

These will graphically prompt you to update the affinity application.

$ nix run github:mrshmllow/affinity-nix#updatePhoto

$ nix run github:mrshmllow/affinity-nix#updateDesigner

$ nix run github:mrshmllow/affinity-nix#updatePublisher

4. Troubleshooting, winetricks, wineboot, and more

You can access winetricks, wine, and wineboot with the affinity environment & wine prefix baked in with nix run.

Tip

Armed with these you should be able to follow https://affinity.liz.pet/docs/misc-troubleshooting.html for troubleshooting steps.

$ nix run github:mrshmllow/affinity-nix#winetricks

$ nix run github:mrshmllow/affinity-nix#wine

$ nix run github:mrshmllow/affinity-nix#wine -- winecfg

$ nix run github:mrshmllow/affinity-nix#wineboot

FAQ

Im getting Unfortunately, we cannot download file affinity-photo-msi-2.5.7.exe automatically.

You got an error such as:

error: builder for '/nix/store/wnh96wlyi5f6ywr628mjfdpvsl8w03m0-affinity-designer-msi-2.5.7.exe.drv' failed with exit code 1;
       last 11 log lines:
       >
       > ***
       > Unfortunately, we cannot download file affinity-designer-msi-2.5.7.exe automatically.
       > Please go to https://store.serif.com/en-gb/update/windows/designer/2/ to download it yourself, and add it to the Nix store
       > using either
       >   nix-store --add-fixed sha256 affinity-designer-msi-2.5.7.exe
       > or
       >   nix-prefetch-url --type sha256 file:///path/to/affinity-designer-msi-2.5.7.exe
       >
       > ***
       >
       For full logs, run 'nix log /nix/store/wnh96wlyi5f6ywr628mjfdpvsl8w03m0-affinity-designer-msi-2.5.7.exe.drv'.

Tip

You must follow the instructions

Download the exe from the url in the error, and run the example command to add it to the store.

I ran the store command above but its still not building!

Double check which tool you are running. You likely added the exe for Photo but you are running Designer / Publisher. You must add the installation exe for every tool you want to run.