From 7e3c92dd259ca4415a0336043c48419e44a52f85 Mon Sep 17 00:00:00 2001 From: Ivan Dimitrov Date: Fri, 19 Apr 2024 16:31:56 +0300 Subject: [PATCH] add sway systemd session --- home/default.nix | 1 + home/ivand/default.nix | 4 ++++ modules/home/programs/cliphist/default.nix | 6 ++++++ modules/home/programs/default.nix | 1 + modules/home/programs/sway/config | 3 --- modules/home/programs/sway/default.nix | 1 + modules/home/programs/waybar/default.nix | 4 ++++ 7 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 modules/home/programs/cliphist/default.nix diff --git a/home/default.nix b/home/default.nix index b5c367a..6ad6cc2 100644 --- a/home/default.nix +++ b/home/default.nix @@ -5,6 +5,7 @@ let browserpass carapace chromium + cliphist comma firefox git diff --git a/home/ivand/default.nix b/home/ivand/default.nix index a456393..49973c3 100644 --- a/home/ivand/default.nix +++ b/home/ivand/default.nix @@ -46,6 +46,10 @@ }; }; rbingwp = { + Unit = { + Description = "Restart bingwp and wpd services"; + After = "sway-session.target"; + }; Service = { Type = "oneshot"; ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ]; diff --git a/modules/home/programs/cliphist/default.nix b/modules/home/programs/cliphist/default.nix new file mode 100644 index 0000000..aece32f --- /dev/null +++ b/modules/home/programs/cliphist/default.nix @@ -0,0 +1,6 @@ +{ + services.cliphist = { + enable = true; + systemdTarget = "sway-session.target"; + }; +} diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index cc8808c..0f5a9ea 100644 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -7,6 +7,7 @@ browserpass = { programs.browserpass.enable = true; }; carapace = import ./carapace; chromium = import ./chromium { inherit pkgs; }; + cliphist = import ./cliphist; comma = import ./comma; firefox = import ./firefox { inherit pkgs; }; git = import ./git; diff --git a/modules/home/programs/sway/config b/modules/home/programs/sway/config index 438260f..99f62cb 100644 --- a/modules/home/programs/sway/config +++ b/modules/home/programs/sway/config @@ -6,12 +6,9 @@ set $right l set $term kitty set $menu bemenu-run | xargs swaymsg exec -- -exec waybar exec swaymsg "workspace 1; exec kitty" exec swaymsg "workspace 2; exec firefox" -exec systemctl --user restart rbingwp.service - # Start a terminal bindsym $mod+Return exec $term diff --git a/modules/home/programs/sway/default.nix b/modules/home/programs/sway/default.nix index 58cfbd0..13b139c 100644 --- a/modules/home/programs/sway/default.nix +++ b/modules/home/programs/sway/default.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { wayland.windowManager.sway = { enable = true; + systemd.enable = true; config = null; extraConfig = builtins.readFile ./config; }; diff --git a/modules/home/programs/waybar/default.nix b/modules/home/programs/waybar/default.nix index 885df5e..2c80ddc 100644 --- a/modules/home/programs/waybar/default.nix +++ b/modules/home/programs/waybar/default.nix @@ -29,5 +29,9 @@ }; }; }; + systemd = { + enable = true; + target = "sway-session.target"; + }; }; }