Commit 64daa75e09d6
Changed files (5)
machine
profiles
machine/hokkaido.nix
@@ -10,6 +10,7 @@
../profiles/laptop.nix
../profiles/virtualization.nix
../profiles/dockerization.nix
+ ../profiles/synergy-server.nix
../location/docker.nix
../hardware/thinkpad-x220.nix
../service/ssh-tunnel.nix
@@ -34,17 +35,6 @@ section: options
keystroke(super+shift+right) = switchInDirection(right)
end
''; };
-
- services.synergy = {
- server = {
- enable = true;
- autoStart = false;
- screenName = "hokkaido";
- address = "0.0.0.0";
- };
- };
-
- networking.firewall.allowedTCPPorts = [ 24800 ];
services.ssh-tunnel = {
enable = true;
machine/shikoku.nix
@@ -11,26 +11,32 @@
../profiles/virtualization.nix
../profiles/dockerization.nix
../profiles/office.nix
+ ../profiles/gaming.nix
+ ../profiles/synergy-server.nix
../location/home.nix
- #../hardware/dell-latitude-e6540.nix
../service/ssh-tunnel.nix
];
-# boot = {
-# loader = {
-# grub = {
-# enable = true;
-# version = 2;
-# device = "/dev/sdc";
-# extraEntries = ''
-# menuentry "Windows 10" {
-# insmod ntfs
-# search --no-floppy --fs-uuid --set EE62F055662F023CD
-# chainloarder +1
-# }
-# '';
-# };
-# };
-# };
-
+ services = {
+ xserver = {
+ videoDrivers = [ "nvidia" ];
+ };
+ };
+
+ environment.etc."synergy-server.conf" = { text = ''
+section: screens
+ shikoku:
+ wakasu:
+end
+section: links
+ shikoku:
+ left = wakasu
+ wakasu:
+ right = shikoku
+end
+section: options
+ keystroke(super+shift+left) = switchInDirection(left)
+ keystroke(super+shift+right) = switchInDirection(right)
+end
+''; };
}
profiles/gaming.nix
@@ -0,0 +1,15 @@
+{ config, pkgs, ... }:
+
+{
+ environment = {
+ systemPackages = with pkgs; [
+ steam
+ discord
+ ];
+ };
+ hardware = {
+ opengl = {
+ driSupport32Bit = true;
+ };
+ };
+}
profiles/synergy-server.nix
@@ -0,0 +1,20 @@
+{ config, pkgs, ... }:
+
+{
+ imports = [
+ ./synergy.nix
+ ];
+ systemd.user.services.synergy = {
+ description = "Synergy sharing server";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ RestartSec = 10;
+ Restart = "on-failure";
+ ExecStart = "${pkgs.synergy}/bin/synergys -c /etc/synergy-server.conf -f -a 0.0.0.0";
+ Environment = "PATH=/run/current-system/sw/bin/";
+ };
+ };
+ systemd.user.services.synergy.enable = true;
+
+ networking.firewall.allowedTCPPorts = [ 24800 ];
+}
profiles/synergy.nix
@@ -0,0 +1,9 @@
+{ config, pkgs, ... }:
+
+{
+ environment = {
+ systemPackages = with pkgs; [
+ synergy
+ ];
+ };
+}