syncthing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
imports = [
|
||||
### System modules ###
|
||||
#../graphical/lxqt.nix
|
||||
../cli-tools.nix
|
||||
../docker.nix
|
||||
../fh/scanning.nix
|
||||
@@ -15,10 +15,8 @@
|
||||
../graphical/ime.nix
|
||||
../graphical/obs.nix
|
||||
../graphical/openrgb.nix
|
||||
#../graphical/lxqt.nix
|
||||
../graphical/plasma.nix
|
||||
../graphical/shared.nix
|
||||
../fh/scanning.nix
|
||||
../hardware/firmware.nix
|
||||
../hardware/nvidia.nix
|
||||
../hardware/ssd.nix
|
||||
@@ -29,10 +27,11 @@
|
||||
../nix/ld.nix
|
||||
../nix/settings.nix
|
||||
../noise-supression.nix
|
||||
../services/syncthing.nix
|
||||
../static-ip.nix
|
||||
../support/ntfs.nix
|
||||
../tmpfs.nix
|
||||
../virt-manager.nix
|
||||
../static-ip.nix
|
||||
../wireshark.nix
|
||||
#../fh/forensik.nix
|
||||
#../graphical/hyprland.nix
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
{ pkgs, ...} :
|
||||
{
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
sound.enable = false;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
package = pkgs.unstable.pipewire;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,12 +2,42 @@
|
||||
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb.layout = config.mainUser.layout;
|
||||
xkb.variant = config.mainUser.variant;
|
||||
enable = true;
|
||||
displayManager.sddm.enable = true;
|
||||
displayManager.sddm.settings.Wayland.SessionDir = "${pkgs.plasma5Packages.plasma-workspace}/share/wayland-sessions";
|
||||
#displayManager.sddm.wayland.enable = true;
|
||||
|
||||
libinput = {
|
||||
enable = true;
|
||||
|
||||
# disabling mouse acceleration
|
||||
mouse = {
|
||||
accelProfile = "flat";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [ ocean-sound-theme spectacle ];
|
||||
|
||||
environment.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
#xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wayland-utils
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,38 +1,45 @@
|
||||
{ config, pkgs, lib, vars, ... }:
|
||||
let
|
||||
basePath = "/mnt/1tbssd/syncthing";
|
||||
basePath = "/synced";
|
||||
in
|
||||
{
|
||||
age.secrets.syncthing-key = {
|
||||
file = ../../secrets/syncthing-key.age;
|
||||
owner = "syncthing";
|
||||
group = "syncthing";
|
||||
};
|
||||
age.secrets.syncthing-cert = {
|
||||
file = ../../secrets/syncthing-cert.age;
|
||||
owner = "syncthing";
|
||||
group = "syncthing";
|
||||
};
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${basePath} 0700 ${config.mainUser.name} users -"
|
||||
];
|
||||
|
||||
# check device id: syncthing cli --gui-address=/synced/gui-socket --gui-apikey=<key> show system
|
||||
environment.systemPackages = [ syncthing ];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
dataDir = basePath;
|
||||
openDefaultPorts = true;
|
||||
cert = "/run/agenix/syncthing-cert";
|
||||
key = "/run/agenix/syncthing-key";
|
||||
guiAddress = "0.0.0.0:8384";
|
||||
user = config.mainUser.name;
|
||||
group = "users";
|
||||
guiAddress = "${basePath}/gui-socket";
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
|
||||
settings = {
|
||||
options.urAccepted = -1;
|
||||
options.relaysEnabled = false;
|
||||
devices.kop-pc.id = "2IEILKO-R6UVES4-N27PZRT-YLPOPR3-LTD5SXA-C65FWF3-RYD2B2Y-PEZLTAR";
|
||||
devices.kop-pc.adresses = [ "tcp://192.168.0.11:51820"];
|
||||
options.globalAnnounceEnabled = false;
|
||||
options.gui.enabled = false;
|
||||
|
||||
folders."~/sync" = {
|
||||
id = "sync";
|
||||
devices = {
|
||||
kop-pc = {
|
||||
id = "DZKIUS7-WCGTYEV-4OKVSZU-MIVL2NC-N45AKZL-ABT3VN2-I7RXUMF-RF4CYAU";
|
||||
adresses = [ "tcp://192.168.0.11:51820"];
|
||||
};
|
||||
};
|
||||
|
||||
folders."${basePath}/default" = {
|
||||
id = "default";
|
||||
devices = [ "kop-pc" ];
|
||||
ignorePerms = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 8384 ];
|
||||
networking.firewall.allowedTCPPorts = [ 8384 22000 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user