nichts/modules/wms/wayland/niri/default.nix

53 lines
1.1 KiB
Nix
Raw Normal View History

2024-05-22 14:29:45 +02:00
{
pkgs,
lib,
theme,
...
}: let
2024-05-20 23:55:11 +02:00
mkService = lib.recursiveUpdate {
2024-05-22 14:29:45 +02:00
Unit.PartOf = ["graphical-session.target"];
Unit.After = ["graphical-session.target"];
Install.WantedBy = ["graphical-session.target"];
2024-05-20 23:55:11 +02:00
};
in {
2024-05-22 14:29:45 +02:00
imports = [./config.nix];
home.packages = with pkgs; [pamixer];
2024-05-20 23:55:11 +02:00
services = {
wlsunset = {
# TODO: fix opaque red screen issue
enable = true;
latitude = "52.0";
longitude = "21.0";
temperature = {
day = 6200;
night = 3750;
};
systemdTarget = "niri.service";
};
cliphist.enable = true;
};
systemd.user.targets = {
# fake a tray to let apps start
# https://github.com/nix-community/home-manager/issues/2064
tray = {
Unit = {
Description = "Home Manager System Tray";
2024-05-22 14:29:45 +02:00
Requires = ["graphical-session-pre.target"];
2024-05-20 23:55:11 +02:00
};
};
};
systemd.user.services = {
swaybg = mkService {
Unit = {
Description = "Wallpaper chooser";
After = "niri.service";
};
Service = {
ExecStart = "${lib.getExe pkgs.swaybg} -i ${theme.wallpaper}";
Restart = "always";
};
};
};
}