40 lines
869 B
Nix
40 lines
869 B
Nix
{ config, lib, ... }: {
|
|
|
|
imports = [
|
|
./programs
|
|
./services
|
|
./users
|
|
];
|
|
|
|
options.homeconfig = with lib; {
|
|
host = mkOption {
|
|
type = with types; nullOr str;
|
|
default = null;
|
|
};
|
|
|
|
username = mkOption {
|
|
type = with types; nullOr str;
|
|
default = null;
|
|
};
|
|
|
|
graphical = mkOption {
|
|
type = with types; bool;
|
|
default = true;
|
|
};
|
|
|
|
standalone.enable = mkOption {
|
|
type = with types; bool;
|
|
default = false;
|
|
};
|
|
};
|
|
|
|
config = {
|
|
|
|
home.username = lib.mkDefault config.homeconfig.username;
|
|
|
|
home.homeDirectory = lib.mkDefault "/home/${config.homeconfig.username}";
|
|
|
|
programs.home-manager.enable = config.homeconfig.standalone.enable;
|
|
};
|
|
}
|