4e925f8a89
also added the configuration bc idk how to add only certain files but whatever
91 lines
2.0 KiB
Nix
91 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
shared,
|
|
...
|
|
}:
|
|
{
|
|
options.homelab.core = {
|
|
kernel = lib.mkOption {
|
|
type = with lib.types; enum (builtins.attrNames shared.kernelOptions);
|
|
default = "lts";
|
|
description = "The kernel of the machine";
|
|
};
|
|
|
|
bootloader = {
|
|
type = lib.mkOption {
|
|
type = lib.types.enum [
|
|
"grub"
|
|
"systemd"
|
|
];
|
|
default = "grub";
|
|
description = "Which bootloader to use (grub or systemd-boot)";
|
|
};
|
|
|
|
grub = lib.mkOption {
|
|
type = lib.types.submodule {
|
|
options = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
|
|
device = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "nodev";
|
|
description = "Device to install GRUB on";
|
|
};
|
|
};
|
|
};
|
|
default = { };
|
|
description = "GRUB configuration block";
|
|
};
|
|
|
|
systemd = lib.mkOption {
|
|
type = lib.types.submodule {
|
|
options = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
|
|
efiSupport = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
};
|
|
};
|
|
};
|
|
default = { };
|
|
description = "systemd-boot configuration block";
|
|
};
|
|
};
|
|
|
|
user = {
|
|
name = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "river";
|
|
description = "The username of the primary user";
|
|
};
|
|
|
|
fullName = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "Maaz Khokhar";
|
|
description = "The full name of the user";
|
|
};
|
|
|
|
shell = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "fish";
|
|
description = "The shell the primary user uses";
|
|
};
|
|
};
|
|
|
|
allowUnfree = lib.mkEnableOption "unfree packages" // {
|
|
default = true;
|
|
};
|
|
|
|
ssh = {
|
|
permitRootLogin = lib.mkEnableOption "root SSH login";
|
|
};
|
|
};
|
|
}
|