mirror of
https://github.com/zoriya/flake.git
synced 2026-06-02 10:45:59 +00:00
Fix startup/shutdown issues
This commit is contained in:
@@ -7,11 +7,10 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "agreety --cmd /bin/sh";
|
||||
command = "${pkgs.greetd.greetd}/bin/agreety --cmd zsh";
|
||||
user = "greeter";
|
||||
};
|
||||
initial_session = {
|
||||
# TODO: Start river in locked mode or exit if locker crashes.
|
||||
# zsh -c is to give river access to profile variables
|
||||
command = "zsh -c river";
|
||||
user = "zoriya";
|
||||
|
||||
@@ -28,11 +28,15 @@ in {
|
||||
|
||||
wayland.windowManager.river = {
|
||||
enable = true;
|
||||
extraSessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "river";
|
||||
};
|
||||
settings = {
|
||||
default-layout = "rivercarro";
|
||||
spawn = [
|
||||
"${pkgs.rivercarro}/bin/rivercarro"
|
||||
"wallpaper"
|
||||
"ags"
|
||||
"discord"
|
||||
"youtube-music"
|
||||
];
|
||||
@@ -131,11 +135,26 @@ in {
|
||||
riverctl map normal Super+Shift 0 set-view-tags "$all_tags"
|
||||
'';
|
||||
systemd.extraCommands = [
|
||||
"trap 'systemctl --user stop river-session.target' INT TERM"
|
||||
"systemctl --user reset-failed"
|
||||
# "systemctl --user import-environment $VARIABLES"
|
||||
"systemctl --user start river-session.target"
|
||||
"trap 'systemctl --user start --job-mode=replace-irreversibly river-session-shutdown.target' INT TERM"
|
||||
# && systemctl --user unset-environment $VARIABLES (in trap)
|
||||
"hyprlock --immediate"
|
||||
"sleep infinity"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.user.targets.river-session-shutdown = {
|
||||
Unit = {
|
||||
Description = "shutdown river compositor session";
|
||||
DefaultDependencies = "no";
|
||||
StopWhenUnneeded = true;
|
||||
Conflicts = ["graphical-session.target" "graphical-session-pre.target" "river-session.target"];
|
||||
After = ["graphical-session.target" "graphical-session-pre.target" "river-session.target"];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnome-control-center
|
||||
gnome.gnome-weather
|
||||
|
||||
+17
-19
@@ -15,40 +15,38 @@
|
||||
];
|
||||
installPhase = "install -Dm755 ${./covercolors.py} $out/bin/covercolors";
|
||||
};
|
||||
systemdTarget = "graphical-session.target";
|
||||
# systemdTarget = "graphical-session.target";
|
||||
ags = pkgs.ags.overrideAttrs (_: prev: {
|
||||
buildInputs =
|
||||
prev.buildInputs
|
||||
++ [
|
||||
pkgs.bash
|
||||
pkgs.libdbusmenu-gtk3
|
||||
inputs.astal-river.packages.x86_64-linux.default
|
||||
];
|
||||
});
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
# TODO: Remove this after testing
|
||||
ags
|
||||
# TODO: Find a way to add this for ags only
|
||||
covercolors
|
||||
brightnessctl
|
||||
];
|
||||
systemd.user.services.ags = {
|
||||
Unit = {
|
||||
Description = " A customizable and extensible shell ";
|
||||
PartOf = systemdTarget;
|
||||
Requires = systemdTarget;
|
||||
After = systemdTarget;
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${ags}/bin/ags";
|
||||
Restart = "always";
|
||||
};
|
||||
|
||||
Install = {WantedBy = [systemdTarget];};
|
||||
};
|
||||
# systemd.user.services.ags = {
|
||||
# Unit = {
|
||||
# Description = " A customizable and extensible shell ";
|
||||
# PartOf = systemdTarget;
|
||||
# Requires = systemdTarget;
|
||||
# After = systemdTarget;
|
||||
# };
|
||||
#
|
||||
# Service = {
|
||||
# Type = "simple";
|
||||
# ExecStart = "${ags}/bin/ags";
|
||||
# Restart = "always";
|
||||
# };
|
||||
#
|
||||
# Install = {WantedBy = [systemdTarget];};
|
||||
# };
|
||||
|
||||
xdg.configFile."ags".source = ./.;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ const Header = () =>
|
||||
name: "shutdown",
|
||||
icon: "system-shutdown-symbolic",
|
||||
title: "Shutdown?",
|
||||
command: "shutdown --now",
|
||||
command: "shutdown now",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
+6
-5
@@ -22,7 +22,8 @@ in {
|
||||
settings = {
|
||||
general = {
|
||||
grace = 3;
|
||||
ignore_emauthpty_input = true;
|
||||
ignore_empty_input = true;
|
||||
immediate_render = true;
|
||||
};
|
||||
background = {
|
||||
monitor = "";
|
||||
@@ -33,7 +34,7 @@ in {
|
||||
size = "250, 50";
|
||||
outline_thickness = 0;
|
||||
dots_size = 0.26;
|
||||
inner_color = "#ff0000";
|
||||
inner_color = "rgb(255, 0, 0)";
|
||||
dots_spacing = 0.64;
|
||||
dots_center = true;
|
||||
fade_on_empty = true;
|
||||
@@ -48,7 +49,7 @@ in {
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:1000] echo "<b><big> $(${pkgs.coreutils}/bin/date +"%H:%M") </big></b>"'';
|
||||
color = "#ff0000";
|
||||
color = "rgb(255, 0, 0)";
|
||||
|
||||
font_size = 64;
|
||||
font_family = "monospace";
|
||||
@@ -61,7 +62,7 @@ in {
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:18000000] echo "<b> "$(${pkgs.coreutils}/bin/date +'%A, %-d %B %Y')" </b>"'';
|
||||
color = "#ff0000";
|
||||
color = "rgb(255, 0, 0)";
|
||||
|
||||
font_size = 24;
|
||||
font_family = "monospace";
|
||||
@@ -84,7 +85,7 @@ in {
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 1800;
|
||||
timeout = 900; # 15min
|
||||
on-timeout = "${pkgs.procps}/bin/pidof hyprlock && ${pkgs.systemd}/bin/systemctl suspend";
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user