1
1
Fork 0

Compare commits

..

No commits in common. "7d2190a8f0e28e5e9f7992131029947fbd7ef471" and "d20ba24b96cc97bcc80a3156133a96f7f6ddc635" have entirely different histories.

4 changed files with 12 additions and 35 deletions

View file

@ -3,21 +3,12 @@
lib,
...
}:
with lib; let
cfg = config.custom.desktops;
in {
options.custom.desktops = {
enable = mkOption {default = config.custom.minimal;};
desktop = mkOption {default = "niri";};
};
config = mkIf cfg.enable {
custom.desktops = {
gnome.enable = cfg.desktop == "gnome";
hyprland.enable = cfg.desktop == "hyprland";
kde.enable = cfg.desktop == "kde";
niri.enable = cfg.desktop == "niri";
sway.enable = cfg.desktop == "sway";
};
with lib; {
config.custom.desktops = mkIf config.custom.full {
#// gnome.enable = true;
#// hyprland.enable = true;
#// kde.enable = true;
niri.enable = true;
#// sway.enable = true;
};
}

View file

@ -9,7 +9,6 @@ with lib; let
hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
hyprlock = "${config.home-manager.users.${config.custom.username}.programs.hyprlock.package}/bin/hyprlock";
loginctl = "${pkgs.systemd}/bin/loginctl";
niri = "${config.programs.niri.package}/bin/niri";
pgrep = "${pkgs.procps}/bin/pgrep";
pw-cli = "${pkgs.pipewire}/bin/pw-cli";
systemctl = "${pkgs.systemd}/bin/systemctl";
@ -38,12 +37,7 @@ in {
{
timeout = 20 * 60; # Seconds
on-timeout =
if config.custom.desktops.desktop == "hyprland"
then "${hyprctl} dispatch dpms off"
else if config.custom.desktops.desktop == "niri"
then "${niri} msg action power-off-monitors"
else "";
on-timeout = "${hyprctl} dispatch dpms off";
}
{
@ -53,13 +47,5 @@ in {
];
};
};
# BUG: graphical-session-pre.target may not have WAYLAND_DISPLAY set, so service is skipped
# https://github.com/nix-community/home-manager/issues/5899
systemd.user.services.hypridle = {
Unit = {
After = mkForce ["graphical-session.target"]; # graphical-session-pre.target
};
};
};
}

View file

@ -12,9 +12,9 @@
minimal = true;
profile = "console";
desktops = {
desktop = "gnome";
gnome.gdm = false;
desktops.gnome = {
enable = true;
gdm = false;
};
programs = {

View file

@ -1,7 +1,7 @@
{
custom = {
full = true;
profile = "desktop"; # Inherit desktop profile
profile = "desktop"; # Inherit desktop
};
#!! Rebuild offline - drastically increases initial download and resulting closure size