1
0
Fork 0
nix-configuration/modules/base/roles.nix

58 lines
999 B
Nix
Raw Normal View History

2024-06-04 14:18:45 -04:00
{
lib,
config,
pkgs,
...
}:
let
cfg = config.host.role;
in
{
options = {
host.role = lib.mkOption {
type = lib.types.enum [
"server"
"workstation"
];
};
};
config = lib.mkMerge [
# Servers
(lib.mkIf (cfg == "server") {
host.apps.tmux.enable = true;
environment.systemPackages = with pkgs; [
htop
mdadm
];
})
# Workstations
(lib.mkIf (cfg == "workstation") {
host.ui = {
audio.enable = true;
bluetooth.enable = true;
gnome.enable = true;
flatpak.enable = true;
};
boot = {
# Enable Plymouth
plymouth.enable = true;
plymouth.theme = "bgrt";
# Increase minimum log level. This removes ACPI errors from the boot screen.
consoleLogLevel = 1;
# Add kernel parameters
2024-06-20 17:37:44 -04:00
kernelParams = [
"quiet"
"splash"
];
initrd.verbose = false;
2024-06-04 14:18:45 -04:00
};
})
];
}