Refactor home configuration

This commit is contained in:
xenia 2023-10-18 23:56:44 +02:00
parent 5e8ef3c462
commit 7a074ac055

View File

@ -29,22 +29,23 @@
outputs = { self, nixpkgs, home-manager, kak, unispect, ansi-utils, unambig-path }: outputs = { self, nixpkgs, home-manager, kak, unispect, ansi-utils, unambig-path }:
let let
system = "aarch64-darwin";
pkgs = import nixpkgs { system = system; config.allowUnfree = true; };
xdg-runtime-dir = "/tmp/xdg-rt"; xdg-runtime-dir = "/tmp/xdg-rt";
home = import ./home.nix { mkPkgs = system: import nixpkgs { system = system; config.allowUnfree = true; };
mkHome = {system, pkgs} : import ./home.nix {
kak-pkg = kak.packages.${system}.kak; kak-pkg = kak.packages.${system}.kak;
unispect = unispect.packages.${system}.unispect; unispect = unispect.packages.${system}.unispect;
ansi-utils = ansi-utils.packages.${system}; ansi-utils = ansi-utils.packages.${system};
unambig-path = unambig-path.packages.${system}.unambig-path; unambig-path = unambig-path.packages.${system}.unambig-path;
inherit pkgs xdg-runtime-dir; inherit pkgs xdg-runtime-dir;
}; };
in { in {
homeConfigurations."xenia" = home-manager.lib.homeManagerConfiguration { homeConfigurations."xenia" =
let
system = "aarch64-darwin";
pkgs = mkPkgs system;
home = mkHome { inherit system pkgs; };
in home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ modules = [
@ -52,5 +53,6 @@
( import ./mac.nix { emacs = home.programs.emacs.package; inherit pkgs xdg-runtime-dir; } ) ( import ./mac.nix { emacs = home.programs.emacs.package; inherit pkgs xdg-runtime-dir; } )
]; ];
}; };
}; };
} }