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;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Setting the homely options.
|
# Setting the homely options.
|
||||||
home.username = builtins.baseNameOf path;
|
home.username = metadata.username or name;
|
||||||
home.homeDirectory = "/home/${config.home.username}";
|
home.homeDirectory = metadata.home-directory or "/home/${config.home.username}";
|
||||||
})
|
})
|
||||||
userSharedConfig
|
userSharedConfig
|
||||||
path
|
path
|
||||||
@ -336,6 +336,7 @@
|
|||||||
mkUser {
|
mkUser {
|
||||||
inherit extraModules extraArgs;
|
inherit extraModules extraArgs;
|
||||||
system = metadata.system or defaultSystem;
|
system = metadata.system or defaultSystem;
|
||||||
|
home-manager-channel = metadata.home-manager-channel or "home-manager";
|
||||||
})
|
})
|
||||||
users;
|
users;
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# A wrapper around the home-manager configuration function.
|
# A wrapper around the home-manager configuration function.
|
||||||
mkUser = { system, extraModules ? [ ], extraArgs ? { } }:
|
mkUser = { system, extraModules ? [ ], extraArgs ? { }, home-manager-channel ? "home-manager" }:
|
||||||
inputs.home-manager.lib.homeManagerConfiguration {
|
inputs."${home-manager-channel}".lib.homeManagerConfiguration {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
extraSpecialArgs = extraArgs;
|
extraSpecialArgs = extraArgs;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
Loading…
Reference in New Issue
Block a user