Skip to content

mrshmllow/affinity-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

affinity-nix

image

About

Affinity v3 & v2 packaged with Nix!

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

Recent Breaking Changes

With the release of v3, there has been some changes:

  • Packages {wine,wineboot,wineserver,winetricks} have been removed. There are instructions below to access these binaries.
  • Packages {update,direct}* have been removed. There are instructions below to update the apps.
  • Since v3 was unified into a single application, {photo,designer,publisher} remain the way to access v2 affinity, with v3 becoming the package to access the v3 application.
  • Additionally, the default package now points to v3.

Preamble

Tip

Add garnix as a substituter to avoid compling yourself.

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

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#v3

-- v2 versions:

$ 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#v3

-- v2 versions:

$ 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.v3];
        }
      ];
    };
  }
}
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.v3];
        }
      ];
    };
  }
}

Updating the applications

These will graphically prompt you to update the affinity application.

$ nix run github:mrshmllow/affinity-nix#{v3,photo,designer,publisher} -- update

Troubleshooting, winetricks, wineboot, and more

Each package (v3|photo|designer|publisher) has the following usage:

$ affinity-v3 --help
Usage: affinity-v3 [COMMAND] [OPTIONS]

Commands:
  wine
  winetricks
  wineboot
  wineserver
  update|repair|install   Update or repair the application
  help                    Show this
  (nothing)               Launch Affinity v3

Tip

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

For example, accessing wine:

$ affinity-v3 wine
Usage: wine PROGRAM [ARGUMENTS...]   Run the specified program
       wine --help                   Display this help and exit
       wine --version                Output version information and exit

Or winecfg:

$ affinity-v3 wine winecfg

Sponsor this project

 

Contributors 7

Languages