diff --git a/hardware/zenix.nix b/hardware/zenix.nix index 77c2ae9..60143aa 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -70,11 +70,4 @@ hardware.keyboard.zsa.enable = true; - services.tlp = { - settings = { - # power limit poor old radeon gpu - RADEON_DPM_PERF_LEVEL_ON_AC = "low"; - }; - }; - } diff --git a/lib/modules/wayland.nix b/lib/modules/wayland.nix new file mode 100644 index 0000000..67fd6e5 --- /dev/null +++ b/lib/modules/wayland.nix @@ -0,0 +1,28 @@ +{ user }: { lib, pkgs, config, ... }: +with lib; +let + cfg = config.windowManager; +in +{ + options.windowManager = { + hyprland = mkEnableOption "hyprland"; + sway = mkEnableOption "sway"; + }; + + config = { + services.greetd = { + enable = true; + settings = rec { + hypr_session = { + command = "Hyprland"; + user = user; + }; + sway_session = { + command = "sway"; + user = user; + }; + default_session = if cfg.sway then sway_session else hypr_session; + }; + }; + }; +}