refactor(wayland.utility): utility modules, add gammastep/tools

This commit is contained in:
ooks-io 2024-04-01 18:06:05 +13:00
parent ed8bad82e2
commit ba410aa838
3 changed files with 58 additions and 44 deletions

View file

@ -1,50 +1,17 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.desktop.wayland.base;
in
{ lib, ... }:
{
config = lib.mkIf cfg.enable {
home = {
packages = with pkgs; [
grim
gtk3
libnotify
waypipe
pulseaudio
pamixer
slurp
wf-recorder
wl-clipboard
wl-mirror
xdg-utils
wlr-randr
];
sessionVariables = {
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
XDG_SESSION_TYPE = "wayland";
};
imports = [
./gammastep
./tools
];
options.homeModules.desktop.wayland.utility = {
tools = {
enable = lib.mkEnableOption "Enable wayland specific tools";
};
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
gammastep = {
enable = lib.mkEnableOption "Enable gammastep module";
};
# services.gammastep = {
# enable = true;
# provider = "geoclue2";
# temperature = {
# day = 6000;
# night = 4600;
# };
# settings = {
# general.adjustment-method = "wayland";
# };
# };
};
}

View file

@ -0,0 +1,20 @@
{ lib, config, ... }:
let
cfg = config.homeModules.desktop.wayland.utility.gammastep;
in
{
config = lib.mkIf cfg.enable {
services.gammastep = {
enable = true;
enableVerboseLogging = true;
provider = "geoclue2";
temperature = {
day = 6000;
night = 4000;
};
settings.general.adjustment-method = "wayland";
};
};
}

View file

@ -0,0 +1,27 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.desktop.wayland.utility.tools;
in
{
config = lib.mkIf cfg.enable {
home = {
packages = with pkgs; [
grim
slurp
libnotify
wl-screenrec
wf-recorder
wl-clipboard
];
};
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
};
}