syncthing
This commit is contained in:
@ -34,11 +34,6 @@
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
hostName = "dunamis";
|
||||
# required for syncthing
|
||||
firewall = {
|
||||
allowedTCPPorts = [22000];
|
||||
allowedUDPPorts = [21027 22000];
|
||||
};
|
||||
};
|
||||
|
||||
boot = {
|
||||
@ -66,6 +61,7 @@
|
||||
fstrim.enable = true;
|
||||
fwupd.enable = true;
|
||||
openssh.enable = true;
|
||||
syncthing.openDefaultPorts = true;
|
||||
opensnitch = {
|
||||
enable = false;
|
||||
settings = {
|
||||
|
@ -15,7 +15,6 @@ in {
|
||||
users.users = {
|
||||
user = {
|
||||
hashedPasswordFile = sopSec."user-password-hashed".path;
|
||||
# passwordFile = config.sops.secrets.user-password.path;
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "video" "libvirtd" "dialout"];
|
||||
shell = pkgs.fish;
|
||||
@ -29,8 +28,9 @@ in {
|
||||
createHome = false;
|
||||
group = "remotebuild";
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
"${secrets}/ssh/id_ed25519_sarien_user.pub"
|
||||
"${secrets}/ssh/id_ed25519_eldrid_user.pub"
|
||||
"${secrets}/ssh/id_ed25519_eldrid_rmbuild.pub"
|
||||
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHPR1H7nWA2ay5PORdMJFnJcvVwpk3pTxMPJHQWSF3Z root@vylxae"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -9,6 +9,9 @@
|
||||
|
||||
stylix.targets.fzf.enable = false;
|
||||
services.ssh-agent.enable = true;
|
||||
|
||||
syncthing.enable = true;
|
||||
|
||||
programs = {
|
||||
bat.enable = true;
|
||||
btop = {
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./syncthing.nix
|
||||
./console/yazi.nix
|
||||
./editor/default.nix
|
||||
./shell/default.nix
|
||||
|
44
modules/home/programs/syncthing.nix
Normal file
44
modules/home/programs/syncthing.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.syncthing;
|
||||
in {
|
||||
options = {
|
||||
syncthing.enable = mkEnableOption "enable syncthing";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.syncthing.environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
urAccepted = -1;
|
||||
relaysEnabled = false;
|
||||
};
|
||||
devices = {
|
||||
"dunamis" = {id = "72VRZFX-65SZUKP-2XL2WLG-75MMKLG-PQLDEZN-G5OI5U7-RLF4OHS-LNCXEQX";};
|
||||
"sarien" = {id = "LUVZGFV-OV6FV5E-SDROWHZ-4BR5PFB-VP5Y326-AFEP6NL-ORUMJQQ-SSYCQQO";};
|
||||
};
|
||||
folders = {
|
||||
"docs" = {
|
||||
path = "/home/user/docs";
|
||||
devices = [
|
||||
"dunamis"
|
||||
"sarien"
|
||||
];
|
||||
};
|
||||
"programming" = {
|
||||
path = "/home/user/programming";
|
||||
devices = [
|
||||
"dunamis"
|
||||
"sarien"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user