mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
config: improve home-manager user creation
Now with configurable home-manager channel! Also, I've improved some usage of the metadata to be used from `users.toml`.
This commit is contained in:
parent
fc6da2a710
commit
a91a9fe110
@ -326,8 +326,8 @@
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Setting the homely options.
|
||||
home.username = builtins.baseNameOf path;
|
||||
home.homeDirectory = "/home/${config.home.username}";
|
||||
home.username = metadata.username or name;
|
||||
home.homeDirectory = metadata.home-directory or "/home/${config.home.username}";
|
||||
})
|
||||
userSharedConfig
|
||||
path
|
||||
@ -336,6 +336,7 @@
|
||||
mkUser {
|
||||
inherit extraModules extraArgs;
|
||||
system = metadata.system or defaultSystem;
|
||||
home-manager-channel = metadata.home-manager-channel or "home-manager";
|
||||
})
|
||||
users;
|
||||
|
||||
|
@ -21,8 +21,8 @@ in
|
||||
};
|
||||
|
||||
# A wrapper around the home-manager configuration function.
|
||||
mkUser = { system, extraModules ? [ ], extraArgs ? { } }:
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
mkUser = { system, extraModules ? [ ], extraArgs ? { }, home-manager-channel ? "home-manager" }:
|
||||
inputs."${home-manager-channel}".lib.homeManagerConfiguration {
|
||||
inherit lib;
|
||||
extraSpecialArgs = extraArgs;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
Loading…
Reference in New Issue
Block a user