42 lines
776 B
Nix
42 lines
776 B
Nix
{ config, lib, inputs, ... }:
|
|
|
|
let
|
|
modules = import ./modules.nix;
|
|
username = config.custom.username;
|
|
in {
|
|
options.custom = {
|
|
username = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "dakedres";
|
|
};
|
|
};
|
|
|
|
config.home-manager.users."${username}" = {
|
|
imports =
|
|
(builtins.filter
|
|
(path: builtins.pathExists path)
|
|
(builtins.map
|
|
(path: path + "/home.nix")
|
|
modules
|
|
)
|
|
) ++ [
|
|
./home.nix
|
|
./homeOptions.nix
|
|
];
|
|
|
|
config.home = {
|
|
username = username;
|
|
homeDirectory = "/home/${username}";
|
|
};
|
|
};
|
|
|
|
imports =
|
|
(builtins.filter
|
|
(path: builtins.pathExists path)
|
|
(builtins.map
|
|
(path: path + "/default.nix")
|
|
modules
|
|
)
|
|
);
|
|
}
|