Modularize desktop service and remove desktop.wms from machine opts.

This commit is contained in:
Kevin Baensch 2023-09-09 22:50:25 +02:00
parent 13a25fe675
commit 483c5d3f39
Signed by: derped
GPG key ID: C0F1D326C7626543
6 changed files with 32 additions and 64 deletions

View file

@ -1,17 +1,21 @@
{ pkgs }:
{ config, lib, pkgs, ... }:
#with lib;
with lib;
#mkIf (elem "i3" cfg.xserver.wms) {
# i3 =
{
enable = true;
configFile = (import ../../config/etc/i3/config.nix { inherit pkgs; });
extraPackages = with pkgs; [
dmenu
file
i3lock
i3status
xdg-user-dirs
];
mkIf (elem "desktop::i3" config.machine.services) {
services.xserver = {
enable = true;
windowManager.i3 = {
enable = true;
configFile = (import ../../config/etc/i3/config.nix { inherit pkgs; });
extraPackages = with pkgs; [
dmenu
file
i3lock
i3status
xdg-user-dirs
];
};
};
machine.pkgsets.python3.pkgs = with pkgs.python310Packages; [ py3status pytz tzlocal ];
}

View file

@ -1,6 +1,9 @@
{ pkgs }:
{ config, lib, pkgs, ... }:
{
with lib;
mkIf (elem "desktop::sway" config.machine.services) {
programs.sway = {
enable = true;
extraPackages = with pkgs; [
xwayland
@ -26,4 +29,5 @@
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
'';
}
};
}