merged sync.nix from gitwatch.nix & syncthing.nix
This commit is contained in:
parent
269c59790d
commit
e0668988e6
3 changed files with 42 additions and 37 deletions
|
|
@ -7,12 +7,11 @@
|
||||||
## Selected host modules for import
|
## Selected host modules for import
|
||||||
./hardware.nix # hardware configuration
|
./hardware.nix # hardware configuration
|
||||||
./network.nix # network configuration
|
./network.nix # network configuration
|
||||||
./syncthing.nix # syncthing configuration
|
./sync.nix # syncthing & gitwatch
|
||||||
./gitwatch.nix # more syncthing adjacent stuff
|
|
||||||
./zfs.nix # zfs configuration
|
./zfs.nix # zfs configuration
|
||||||
|
|
||||||
## Additional core modules to import
|
## Additional core modules to import
|
||||||
../../../core/modules/jellyfin.nix
|
../../../core/modules/jellyfin.nix # temporary for config purposes
|
||||||
../../../core/modules/gaming.nix # didnt work in home-manager :(
|
../../../core/modules/gaming.nix # didnt work in home-manager :(
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
# https://github.com/gitwatch/gitwatch
|
|
||||||
{ primaryUser, homeDir, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
services.gitwatch.Keyring = {
|
|
||||||
enable = false;
|
|
||||||
user = "${primaryUser}";
|
|
||||||
path = "${homeDir}/Keyring/";
|
|
||||||
remote = "git@codeberg.org:serenity-F/keyring.git";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gitwatch.Notes = {
|
|
||||||
enable = false;
|
|
||||||
user = "${primaryUser}";
|
|
||||||
path = "${homeDir}/Notes/";
|
|
||||||
remote = "git@codeberg.org:serenity-F/notes.git";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +1,47 @@
|
||||||
|
# https://github.com/gitwatch/gitwatch
|
||||||
|
# https://nixos.wiki/wiki/Syncthing
|
||||||
{ pkgs, primaryUser, homeDir, ... }:
|
{ pkgs, primaryUser, homeDir, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
|
gitwatch # automatic git versioning
|
||||||
syncthing # standard syncthing package
|
syncthing # standard syncthing package
|
||||||
syncthing-tray # tray applet for syncthing
|
syncthing-tray # tray applet for syncthing
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services = {
|
services = {
|
||||||
syncthing = {
|
|
||||||
environment.STNODEFAULTFOLDER = "true"; # prevents the `Sync` folder from being created on activation
|
## Gitwatch
|
||||||
|
gitwatch = {
|
||||||
|
|
||||||
|
Keyring = { # keyring backup, dont have a nextcloud (yet)
|
||||||
|
enable = false;
|
||||||
|
user = "${primaryUser}";
|
||||||
|
path = "${homeDir}/Keyring/";
|
||||||
|
remote = "git@codeberg.org:serenity-F/keyring.git";
|
||||||
|
};
|
||||||
|
|
||||||
|
Notes = { # notes backup, not paying for obsidian backup lol
|
||||||
|
enable = false;
|
||||||
|
user = "${primaryUser}";
|
||||||
|
path = "${homeDir}/Notes/";
|
||||||
|
remote = "git@codeberg.org:serenity-F/notes.git";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
## Syncthing
|
||||||
syncthing = {
|
syncthing = {
|
||||||
enable = true; # easy toggle
|
enable = true; # easy toggle
|
||||||
dataDir = "${homeDir}"; # defaults to primaryUser's homedir
|
dataDir = "${homeDir}"; # defaults to primaryUser's homedir
|
||||||
openDefaultPorts = true; # opens the default firewall ports
|
openDefaultPorts = true; # opens the default firewall ports
|
||||||
configDir = "${homeDir}/.config/syncthing"; # defaults to primaryUser's homedir
|
configDir =
|
||||||
|
"${homeDir}/.config/syncthing"; # defaults to primaryUser's homedir
|
||||||
user = "${primaryUser}"; # uses primaryUser to run the service
|
user = "${primaryUser}"; # uses primaryUser to run the service
|
||||||
group = "users"; # runs in the users group
|
group = "users"; # runs in the users group
|
||||||
guiAddress = "0.0.0.0:8384"; # default web address for the GUI
|
#guiAddress = "0.0.0.0:8384"; # default web address for the GUI
|
||||||
settings = {
|
settings = {
|
||||||
## WebApp GUI
|
## WebApp GUI
|
||||||
user = "serenity";
|
user = "serenity";
|
||||||
|
|
@ -65,7 +83,8 @@
|
||||||
|
|
||||||
## Syncthing Devices
|
## Syncthing Devices
|
||||||
overrideDevices = true; # force these devices on activation
|
overrideDevices = true; # force these devices on activation
|
||||||
devices = { # all syncthing devices listed - 'boilerplate' for other hosts
|
devices =
|
||||||
|
{ # all syncthing devices listed - 'boilerplate' for other hosts
|
||||||
|
|
||||||
#"Orcus".id = "REALLY-LONG-ORCUS-SYNCTHING-KEY-HERE"; # disabled for testing
|
#"Orcus".id = "REALLY-LONG-ORCUS-SYNCTHING-KEY-HERE"; # disabled for testing
|
||||||
#"Hades".id = "REALLY-LONG-HADES-SYNCTHING-KEY-HERE"; # disabled for testing
|
#"Hades".id = "REALLY-LONG-HADES-SYNCTHING-KEY-HERE"; # disabled for testing
|
||||||
|
|
@ -77,4 +96,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services = {
|
||||||
|
syncthing = {
|
||||||
|
environment.STNODEFAULTFOLDER =
|
||||||
|
"true"; # prevents the `Sync` folder from being created on activation
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue