mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
config: make mkHome
more universal
I don't know how to deploy the home-manager configurations with more than one systems reliably without ruining the experience of having to pass an autogenerated name for the correct configuration. The way it's currently done provides no benefit for multi-system users. It's not perfect but for now, we'll set the system through importing nixpkgs which has auto-detection for its system. Though, this makes the user system declaration ineffective.
This commit is contained in:
parent
e1c081b96d
commit
198ded079b
@ -380,9 +380,8 @@
|
||||
lib'.mapAttrs
|
||||
(filename: metadata:
|
||||
let
|
||||
name = metadata._name;
|
||||
system = metadata._system;
|
||||
pkgs = inputs.${metadata.nixpkgs-channel or "nixpkgs"}.legacyPackages.${system};
|
||||
name = metadata.username or filename;
|
||||
pkgs = import nixpkgs { inherit overlays; };
|
||||
path = ./users/home-manager/${name};
|
||||
extraModules = [
|
||||
({ pkgs, config, ... }: {
|
||||
@ -417,7 +416,7 @@
|
||||
];
|
||||
in
|
||||
mkHome {
|
||||
inherit pkgs system extraModules extraArgs;
|
||||
inherit pkgs extraModules extraArgs;
|
||||
home-manager-channel = metadata.home-manager-channel or "home-manager";
|
||||
})
|
||||
users;
|
||||
|
@ -13,7 +13,7 @@
|
||||
};
|
||||
|
||||
# A wrapper around the home-manager configuration function.
|
||||
mkHome = { pkgs, system, extraModules ? [ ], extraArgs ? { }, home-manager-channel ? "home-manager" }:
|
||||
mkHome = { pkgs, extraModules ? [ ], extraArgs ? { }, home-manager-channel ? "home-manager" }:
|
||||
inputs."${home-manager-channel}".lib.homeManagerConfiguration {
|
||||
inherit lib pkgs;
|
||||
extraSpecialArgs = extraArgs;
|
||||
|
Loading…
Reference in New Issue
Block a user