feat: Enable sway at the NixOS level

This commit is contained in:
Jalil David Salamé Messina 2024-01-22 11:08:48 +01:00
parent 92133a3138
commit 751b122587
Signed by: jalil
GPG key ID: F016B9E770737A0B
3 changed files with 12 additions and 4 deletions

View file

@ -1,10 +1,11 @@
{ config, lib, pkgs, ... }:
let
cfg = config.jconfig.gui;
enable = config.jconfig.enable && cfg.enable;
in
{
config = lib.mkMerge [
(lib.mkIf (config.jconfig.enable && cfg.enable) {
(lib.mkIf enable {
environment.systemPackages = [
pkgs.gnome.adwaita-icon-theme
pkgs.adwaita-qt
@ -33,6 +34,10 @@ in
programs.light.enable = true;
programs.dconf.enable = true;
programs.sway.enable = cfg.sway;
programs.sway.wrapperFeatures.base = true;
programs.sway.wrapperFeatures.gtk = true;
security.polkit.enable = true;
security.rtkit.enable = true; # Recommended for pipewire
@ -57,7 +62,7 @@ in
hardware.uinput.enable = true;
hardware.steam-hardware.enable = cfg.steamHardwareSupport;
})
(lib.mkIf cfg."8bitdoFix" {
(lib.mkIf (enable && cfg."8bitdoFix") {
# Udev rules to start or stop systemd service when controller is connected or disconnected
services.udev.extraRules = ''
# May vary depending on your controller model, find product id using 'lsusb'

View file

@ -24,6 +24,7 @@ let
options.autoStart = mkDisableOption "autostarting ydotool at login";
};
};
sway = mkDisableOption "sway";
};
styling.options = {