From f1bd8ee40d7d55f1acf172eef9cb74333ac7e262 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sun, 19 Jan 2020 08:48:30 -0500 Subject: synergy --- nix-home-config/aji.nix | 1 + nix-home-config/my-env.nix | 2 ++ nix-home-config/pincer.nix | 1 + nix-home-config/synergy-server.nix | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 nix-home-config/synergy-server.nix diff --git a/nix-home-config/aji.nix b/nix-home-config/aji.nix index af21dbd..f57764f 100644 --- a/nix-home-config/aji.nix +++ b/nix-home-config/aji.nix @@ -3,6 +3,7 @@ { imports = [ ./my-env.nix + # ./synergy-server.nix ]; home.stateVersion = "19.03"; diff --git a/nix-home-config/my-env.nix b/nix-home-config/my-env.nix index 6a97cf5..265b114 100644 --- a/nix-home-config/my-env.nix +++ b/nix-home-config/my-env.nix @@ -26,5 +26,7 @@ nix-index ffmpeg vlc + rustup + synergy ]; } diff --git a/nix-home-config/pincer.nix b/nix-home-config/pincer.nix index af21dbd..287763d 100644 --- a/nix-home-config/pincer.nix +++ b/nix-home-config/pincer.nix @@ -3,6 +3,7 @@ { imports = [ ./my-env.nix + ./synergy-server.nix ]; home.stateVersion = "19.03"; diff --git a/nix-home-config/synergy-server.nix b/nix-home-config/synergy-server.nix new file mode 100644 index 0000000..c3f66ee --- /dev/null +++ b/nix-home-config/synergy-server.nix @@ -0,0 +1,36 @@ +{ config, pkgs, ... }: + +let + configFile = pkgs.writeText "synergy.conf" '' + section: screens + pincer: + aji: + end + + section: links + pincer: + right = aji + aji: + left = pincer + end + ''; +in +{ + systemd.user.services = { + synergys = { + Unit = { + Description = "Synergy Server"; + After = ["network.target" "graphical-session.target"]; + }; + + Service = { + Type = "simple"; + ExecStart = "${pkgs.synergy}/bin/synergys -f -c ${configFile}"; + }; + + Install = { + WantedBy = ["default.target"]; + }; + }; + }; +} -- cgit v1.2.3