Affinity v3 & v2 packaged with Nix!
Based on https://github.com/lf-/affinity-crimes and https://affinity.liz.pet/, and uses ElementalWarrior's wine.
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, withv3becoming the package to access the v3 application. - Additionally, the
defaultpackage now points to v3.
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/.
Important
You will be graphically prompted to install the application: Leave the installation path default.
$ 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$ 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#publisherInstall 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];
}
];
};
}
}These will graphically prompt you to update the affinity application.
$ nix run github:mrshmllow/affinity-nix#{v3,photo,designer,publisher} -- updateEach 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