From 63bdca6f54a9692e872f243a1fd25017ce53b76e Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Sat, 10 Aug 2024 12:57:23 -0400 Subject: [PATCH] homemanager support v0 --- modules/home-manager.nix | 2 +- modules/lib.nix | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/home-manager.nix b/modules/home-manager.nix index 7aaf6d4..317a12d 100644 --- a/modules/home-manager.nix +++ b/modules/home-manager.nix @@ -3,7 +3,7 @@ let gitconfigs = (builtins.filterSource (path: type: type != "directory") ./gitconfigs); gitconfigFiles = builtins.attrNames (builtins.readDir gitconfigs); - makeCommonGitConfigs = { extraGitConfigs }: { + makeCommonGitConfigs = { extraGitConfigs ? [ ] }: { delta = { enable = true; }; extraConfig = { color = { ui = "auto"; }; diff --git a/modules/lib.nix b/modules/lib.nix index 7e499ad..4519200 100644 --- a/modules/lib.nix +++ b/modules/lib.nix @@ -14,7 +14,7 @@ let (import ./main.nix attrs) ] ++ extraConfiguration; eachSystem = nixpkgs.lib.genAttrs (import systems); - pkgs = eachSystem (system: + allPkgs = eachSystem (system: import nixpkgs { system = system; config = { allowUnfree = true; }; @@ -63,11 +63,13 @@ let { modules ? [ ] , homeManagerVersion , user + , system ? "x86_64-linux" }: let hm = (import ../home-manager.nix { stateVersion = homeManagerVersion; }); + pkgs = allPkgs."${system}"; in home-manager.lib.homeManagerConfiguration { inherit pkgs; @@ -78,7 +80,7 @@ let in { eachSystem = eachSystem; - pkgs = pkgs; + pkgs = allPkgs; makeNixOsModule = makeNixOsModule; makeHLService = makeHLService; makeDarwinModule = makeDarwinModule;