nixos/jaci/modules/kde/kde_conf.nix

70 lines
1.8 KiB
Nix

{ lib, config, pkgs, ... }:
{
options.kde = {
enable = lib.mkEnableOption "Enable kde.";
useNonFree = lib.mkOption {
default = false;
example = true;
description = "Whether to enable non-free software in the kde config";
};
installGaming = lib.mkOption {
default = false;
example = true;
description = "Whether to install gaming software on the system.";
};
systemPackages = lib.mkOption {
default = [];
description = "Add any additional packages desired. Merged with kde defaults.";
};
};
###
## Configuration
###
config = lib.mkIf config.kde.enable {
nixpkgs.config.allowUnfree = config.kde.useNonFree;
###
## System Packages
###
environment.systemPackages = with pkgs; lib.lists.flatten [
[
bash
git
glib # gsettings
ncspot
zsh
]
config.kde.systemPackages
];
programs.zsh.enable = true;
programs.steam.enable = config.kde.installGaming;
# kdeconnect setup
programs.kdeconnect.enable = true;
###
## Services
###
services.openssh.enable = true;
# services.dbus.enable = true;
# enabling kde
services.xserver.enable = true;
services.xserver.displayManager.defaultSession = "plasmawayland";
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
###
## Misc
###
sound.enable = true;
hardware.opengl = {
enable = true;
driSupport = true;
};
};
}