This module can be used to use ags v1 alongside ags v2. You can keep both configs side-by-side, so you can keep your old config while iterating on a new one before switching.
- The ags package will be pinned to the last commit hash for ags v1.
- The binary will install to
agsv1
, so you can still use ags v2 throughags
. - The home-manager module will wrap
agsv1
, to use a different config file than~/.config/ags/config.js
.
- If don't want to configure
agsv1
with home-manager you can just donix profile install github:dtomvan/agsv1#legacyPackages.x86_64-linux.agsv1
- Add this flake as an input to your flake containing your
home-manager
configinputs.agsv1.url = "github:dtomvan/agsv1"; inputs.agsv1.inputs.nixpkgs.follows = "nixpkgs";
- Add an overlay to add
agsv1
to yournixpkgs
outputs = { nixpkgs, home-manager, agsv1, ... } : let system = "x86_64-linux"; pkgs = import inputs.nixpkgs { inherit system; overlays = [(final: prev: { agsv1 = agsv1.legacyPackages.${system}.agsv1; })]; }; in {...}
- Add the home-manager module
homeConfigurations."user" = home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ agsv1.homeManagerModules.agsv1 ./home.nix ]; };
- In your
home.nix
, configure the moduleprograms.agsv1 = { enable = true; configPath = ./ags-config/config.js; # If you don't specify a configPath agsv1 will assume ~/.config/ags/config.js };
home-manager switch
- Your config file is now in
~/.config/agsv1
(just the config.js file, but home-manager should've put the rest in the nix store anyways) - Run ags (in
exec-once
for example) withagsv1
. No need to specify-c
explicitly.