Add unused syncthing instance

This commit is contained in:
Vili Sinervä 2024-06-02 01:31:02 +03:00
parent 22aec3c470
commit aa92958b6a
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
3 changed files with 41 additions and 50 deletions

View file

@ -1,30 +1,4 @@
{ config, pkgs, lib, ... }:
let
unison-conf = "${pkgs.writeText "unison-conf"
''
root = /home/vili
root = ssh://nixos-cpu.vsinerva.fi//home/vili
watch = true
repeat = watch
prefer = newer
diff = diff -y -W 79 --suppress-common-lines
copyprog = rsync --inplace --compress
copyprogrest = rsync --partial --inplace --compress sshargs = -C
path = Desktop
path = Documents
path = Downloads
path = Music
path = Pictures
path = Projects
path = Public
path = School
path = Templates
path = Videos
path = Zotero
''}";
in
{
networking = {
hostName = "helium";
@ -71,6 +45,7 @@ in
imports = [
../base.nix
../vili.nix
../syncthing.nix
../desktop.nix
../development.nix
../misc/libinput.nix
@ -91,30 +66,6 @@ in
zenmonitor moonlight-qt parsec-bin via
];
systemd.services = {
unisonConfSymlink = {
wantedBy = [ "multi-user.target" ];
description = "Symlink for unison conf";
serviceConfig = {
Type = "oneshot";
User = "vili";
ExecStartPre = ''${pkgs.coreutils-full}/bin/mkdir -p /home/vili/.unison'';
ExecStart = ''${pkgs.coreutils-full}/bin/ln -sf ${unison-conf} /home/vili/.unison/cpu.prf'';
};
};
unisonSync = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
description = "unison filesync";
serviceConfig = {
Type = "exec";
User = "vili";
ExecStart = ''${pkgs.unison}/bin/unison -sshcmd ${pkgs.openssh}/bin/ssh cpu'';
};
};
};
# HARDWARE SPECIFIC
boot.initrd.kernelModules = [ "amdgpu" ];
hardware = {

View file

@ -6,6 +6,7 @@
../base.nix
../development.nix
../vili.nix
../syncthing.nix
];
# HARDWARE SPECIFIC