Move syncthing config into dedicated directory

Add SSH keys for tablet and phone to main auth
This commit is contained in:
Evie Litherland-Smith 2023-05-07 13:01:02 +01:00
parent 74f12652e7
commit 50c4da612b
8 changed files with 124 additions and 49 deletions

View file

@ -5,10 +5,10 @@
./common.nix
./hardware/audio.nix
./hardware/bluetooth.nix
./hardware/syncthing.nix
./locales/en_GB.nix
./desktop/hyprland.nix
./desktop/steam.nix
./syncthing/Vanguard.nix
];
networking.hostName = "Vanguard"; # Define your hostname.
@ -28,7 +28,11 @@
description = "Evie Litherland-Smith";
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1tJFdbiyJApuVZFvo9E9kjlBwvXZeySqVuS2qGdxha tux@monarch" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1tJFdbiyJApuVZFvo9E9kjlBwvXZeySqVuS2qGdxha tux@monarch"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGAcvAQ8W71Bn8pdMYst1hoVCmVJ+0h4HBlJzu1C6dwy xenia@Northstar"
];
};
home-manager.users.xenia = { ... }: {
imports = [ ./home/collections/personal ];
@ -42,53 +46,6 @@
programs.fish.shellAbbrs.update = "sudo nixos-rebuild switch";
};
services.syncthing = {
user = "xenia";
group = "users";
dataDir = "/mnt/secondary/syncthing";
devices = {
"ion" = { id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB"; };
"monarch" = { id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ"; };
"northstar" = { id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD"; };
};
folders = {
"archive" = {
id = "hwnqy-xzcdx";
devices = [ "ion" "monarch northstar" ];
ignorePerms = true;
};
"Camera" = {
path = "/mnt/secondary/syncthing/camera";
label = "Camera";
id = "fp4_4j7w-photos";
devices = [ "ion" ];
type = "receiveonly";
ignorePerms = true;
};
"Pictures" = {
path = "/mnt/secondary/syncthing/pictures";
label = "Pictures";
id = "ziuj8-rm6dn";
devices = [ "ion" "monarch" "northstar" ];
ignorePerms = true;
};
"Movies" = {
path = "/mnt/secondary/syncthing/movies";
label = "Movies";
id = "3f75o-4x6sq";
devices = [ "ion" "monarch" "northstar" ];
ignorePerms = true;
};
"Documents" = {
path = "/mnt/secondary/syncthing/documents";
label = "Documents";
id = "qc6qa-bipsd";
devices = [ "monarch" "northstar" ];
ignorePerms = true;
};
};
};
# Extra hardware configuration
hardware.openrazer = {
enable = true;

51
syncthing/Vanguard.nix Normal file
View file

@ -0,0 +1,51 @@
{ ... }:
{
imports = [
./default.nix
./devices/ion.nix
./devices/monarch.nix
./devices/northstar.nix
];
services.syncthing = {
user = "xenia";
group = "users";
dataDir = "/mnt/secondary/syncthing";
folders = {
"Archive" = {
path = "/mnt/secondary/syncthing/archive";
devices = [ "ion" "monarch" "northstar" ];
enable = true;
};
"Books" = {
path = "/mnt/secondary/syncthing/books";
devices = [ "monarch" "northstar" ];
enable = true;
};
"Camera" = {
path = "/mnt/secondary/syncthing/camera";
devices = [ "ion" ];
enable = true;
};
"Documents" = {
path = "/mnt/secondary/syncthing/documents";
devices = [ "monarch" "northstar" ];
enable = true;
};
"Exports" = {
path = "/mnt/secondary/syncthing/exports";
devices = [ "monarch"];
enable = true;
};
"Movies" = {
path = "/mnt/secondary/syncthing/movies";
devices = [ "ion" "monarch" "northstar" ];
enable = true;
};
"Pictures" = {
path = "/mnt/secondary/syncthing/pictures";
devices = [ "ion" "monarch" "northstar" ];
enable = true;
};
};
};
}

View file

@ -1,5 +1,6 @@
{ ... }:
{
imports = [ ./folders ];
services.syncthing = {
enable = true;
systemService = true;

View file

@ -0,0 +1,4 @@
{ ... }:
{
services.syncthing.devices."ion" = { id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB"; };
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
services.syncthing.devices."monarch" = { id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ"; };
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
services.syncthing.devices."northstar" = { id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD"; };
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
services.syncthing.devices."vanguard" = { id = "YNGBLJP-TWY6Y3C-DPPYAWL-3ZQFNQH-RDPIU5T-L54UI62-FPPA3JQ-WYXBZQZ"; };
}

View file

@ -0,0 +1,50 @@
{ lib, ... }:
{
services.syncthing = {
folders = {
"Archive" = {
label = "Archive";
id = "hwnqy-xzcdx";
ignorePerms = true;
enable = lib.mkDefault false;
};
"Books" = {
label = "Books";
id = "zjmxy-ycmbq";
ignorePerms = true;
enable = lib.mkDefault false;
};
"Camera" = {
label = "Camera";
id = "fp4_4j7w-photos";
type = "receiveonly";
ignorePerms = true;
enable = lib.mkDefault false;
};
"Documents" = {
label = "Documents";
id = "qc6qa-bipsd";
ignorePerms = true;
enable = lib.mkDefault false;
};
"Exports" = {
label = "Exports";
id = "tof2e-pdtde";
ignorePerms = true;
enable = lib.mkDefault false;
};
"Movies" = {
label = "Movies";
id = "3f75o-4x6sq";
ignorePerms = true;
enable = lib.mkDefault false;
};
"Pictures" = {
label = "Pictures";
id = "ziuj8-rm6dn";
ignorePerms = true;
enable = lib.mkDefault false;
};
};
};
}