refactoring for iServer and isWorkstation: part 1
This commit is contained in:
parent
94f540b2d0
commit
af1d9ac368
37 changed files with 663 additions and 508 deletions
67
hosts/modules/desktop.nix
Normal file
67
hosts/modules/desktop.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
hostType,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
# Common configuration
|
||||
{
|
||||
}
|
||||
|
||||
# Server specific configuration
|
||||
(lib.mkIf hostType.isServer {
|
||||
})
|
||||
|
||||
# Workstation specific configuration
|
||||
(lib.mkIf hostType.isWorkstation {
|
||||
services = {
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland = {
|
||||
enable = true;
|
||||
compositor = "kwin";
|
||||
};
|
||||
};
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.all = {
|
||||
ids = [ "*" ];
|
||||
settings.main.capslock = "overload(meta, esc)";
|
||||
};
|
||||
};
|
||||
desktopManager.plasma6.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
xpadneo.enable = true;
|
||||
bluetooth.enable = true;
|
||||
steam-hardware.enable = true; # Allow steam client to manage controllers
|
||||
graphics.enable32Bit = true; # For OpenGL games
|
||||
i2c.enable = true;
|
||||
};
|
||||
|
||||
security.rtkit.enable = true; # Needed for pipewire to acquire realtime priority
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-kde
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue