add sway systemd session

This commit is contained in:
Ivan Dimitrov 2024-04-19 16:31:56 +03:00
parent a0eaadddbc
commit 7e3c92dd25
7 changed files with 17 additions and 3 deletions

View File

@ -5,6 +5,7 @@ let
browserpass browserpass
carapace carapace
chromium chromium
cliphist
comma comma
firefox firefox
git git

View File

@ -46,6 +46,10 @@
}; };
}; };
rbingwp = { rbingwp = {
Unit = {
Description = "Restart bingwp and wpd services";
After = "sway-session.target";
};
Service = { Service = {
Type = "oneshot"; Type = "oneshot";
ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ]; ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ];

View File

@ -0,0 +1,6 @@
{
services.cliphist = {
enable = true;
systemdTarget = "sway-session.target";
};
}

View File

@ -7,6 +7,7 @@
browserpass = { programs.browserpass.enable = true; }; browserpass = { programs.browserpass.enable = true; };
carapace = import ./carapace; carapace = import ./carapace;
chromium = import ./chromium { inherit pkgs; }; chromium = import ./chromium { inherit pkgs; };
cliphist = import ./cliphist;
comma = import ./comma; comma = import ./comma;
firefox = import ./firefox { inherit pkgs; }; firefox = import ./firefox { inherit pkgs; };
git = import ./git; git = import ./git;

View File

@ -6,12 +6,9 @@ set $right l
set $term kitty set $term kitty
set $menu bemenu-run | xargs swaymsg exec -- set $menu bemenu-run | xargs swaymsg exec --
exec waybar
exec swaymsg "workspace 1; exec kitty" exec swaymsg "workspace 1; exec kitty"
exec swaymsg "workspace 2; exec firefox" exec swaymsg "workspace 2; exec firefox"
exec systemctl --user restart rbingwp.service
# Start a terminal # Start a terminal
bindsym $mod+Return exec $term bindsym $mod+Return exec $term

View File

@ -1,6 +1,7 @@
{ pkgs, ... }: { { pkgs, ... }: {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
systemd.enable = true;
config = null; config = null;
extraConfig = builtins.readFile ./config; extraConfig = builtins.readFile ./config;
}; };

View File

@ -29,5 +29,9 @@
}; };
}; };
}; };
systemd = {
enable = true;
target = "sway-session.target";
};
}; };
} }