added syncthing - need to secret certs per host

This commit is contained in:
2023-03-08 03:46:34 +00:00
parent c982805de4
commit 0af185c7b6
3 changed files with 51 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
imports = [
inputs.home-manager.nixosModules.home-manager
./sops.nix
./syncthing.nix
]++ (builtins.attrValues outputs.nixosModules);
###dotfiles path variable

49
hosts/syncthing.nix Normal file
View File

@@ -0,0 +1,49 @@
{ lib, inputs, outputs, ... }:
{
services.syncthing = {
enable = true;
dataDir = "/home/sstent";
openDefaultPorts = true;
configDir = "/home/sstent/.config/syncthing";
user = "sstent";
group = "users";
guiAddress = "0.0.0.0:8385";
declarative = {
overrideDevices = true;
overrideFolders = true;
devices = {
"StuPC" = { id = "Z43MPGF-OKG6K34-WTTFUDO-UG6E3TE-YCLSOAT-5LN5KMW-QHL2VSK-EZCGCAP"; };
"Go3" = { id = "YDOL433-AHAL33M-NWLLDDQ-2D36ZIE-YNZVTKE-25TRBZ2-JXRSN7Y-Z5EOVQN"; };
};
folders = {
"default" = {
path = "/home/sstent/sync";
devices = [ "StuPC" "Go3" ];
};
};
};
};
}
# { lib, pkgs, config, ... }:
# with lib;
# let cfg = config.services.ssh-proxy;
# in {
# options.services.ssh-proxy = {
# enable = mkOption {
# type = types.bool;
# default = false;
# description = ''
# Enable Mnt Public for WSL
# '';
# };
# };
# config = mkIf cfg.enable {
# }

View File

@@ -19,7 +19,7 @@ in rec {
# 'sops' Encrypted Secrets
hm_secrets = dir: out_dir:
filter (name: type: type != null && !(hasPrefix "_" name)) (name: type:
if type == "regular" && hasSuffix ".age" name
if type == "regular"
then
nameValuePair name {
sopsFile = dir + "/${name}";