Retire monolith from all services

This commit is contained in:
coolneng 2020-06-09 21:53:20 +02:00
parent 993404088a
commit 59bb473451
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
3 changed files with 32 additions and 46 deletions

View File

@ -1,11 +1,7 @@
# Syncthing and Radicale configuration
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
environment.systemPackages = with pkgs; [
syncthing
radicale
];
environment.systemPackages = with pkgs; [ syncthing radicale ];
# Enable syncthing
services.syncthing = {
@ -15,44 +11,49 @@
dataDir = "/vault/syncthing";
declarative = {
devices = {
monolith = { id = "64P2YDH-S5V7PKM-XXBOSXC-WEXUSC7-B553ELI-6IJ3CPJ-ZFB3YA5-MTKAFAH"; };
roamer = { id = "7CDUG25-KGBOIA7-Y73TZGA-NEHYLZP-OEOEWVN-DMS5U7K-QNNMPKY-YNGEWQL"; };
panacea = { id = "UNZIABR-GEQ4AWT-XKFADLW-HW3SQ3Y-BEYZ56A-W530DLS-DXGQWKK-2QQ4RQ6"; };
roamer = {
id =
"7CDUG25-KGBOIA7-Y73TZGA-NEHYLZP-OEOEWVN-DMS5U7K-QNNMPKY-YNGEWQL";
};
panacea = {
id =
"UNZIABR-GEQ4AWT-XKFADLW-HW3SQ3Y-BEYZ56A-W530DLS-DXGQWKK-2QQ4RQ6";
};
};
folders = {
Documents = {
id = "wusdj-bfjkr";
type = "receiveonly";
path = "/vault/syncthing/Documents";
devices = [ "monolith" "roamer" "panacea" ];
devices = [ "roamer" "panacea" ];
};
Notes = {
id = "kafhz-bfmzm";
type = "receiveonly";
path = "/vault/syncthing/Notes";
devices = [ "monolith" "roamer" "panacea" ];
devices = [ "roamer" "panacea" ];
};
Music = {
id = "2aqt7-vpprc";
type = "receiveonly";
path = "/vault/syncthing/Music";
devices = [ "monolith" "roamer" "panacea" ];
devices = [ "roamer" "panacea" ];
};
Photos = {
id = "mjibc-ustcg";
type = "receiveonly";
path = "/vault/syncthing/Photos";
devices = [ "monolith" "roamer" "panacea" ];
devices = [ "roamer" "panacea" ];
};
Projects = {
id = "cjhmu-avy9v";
type = "receiveonly";
path = "/vault/syncthing/Projects";
devices = [ "monolith" "panacea" ];
devices = [ "panacea" ];
};
};
};

View File

@ -1,15 +1,10 @@
{ config, pkgs, lib, ... }:
let password = builtins.readFile /var/lib/ddclient/token;
let password = builtins.readFile /var/lib/ddclient/token;
in
{
in {
environment.systemPackages = with pkgs; [
avahi
ddclient
wireguard
];
environment.systemPackages = with pkgs; [ avahi ddclient wireguard mbuffer ];
# Enable zeroconf
services.avahi = {
@ -18,11 +13,12 @@
publish = {
enable = true;
userServices = true;
domain = true;
workstation = true;
};
reflector = true;
};
# Dynamic DNS configuration
services.ddclient = {
enable = true;
@ -67,9 +63,9 @@
listenPort = 1194;
privateKeyFile = "/home/coolneng/.wg/keys/privatekey";
peers = [
# Monolith
# Panacea
{
publicKey = "ka9a/VB49XMtrMw/ZJmZHThfk2Y5D/8wErLPtN+KvHE=";
publicKey = "XMkTztU2Y8hw6Fu/2o4Gszij+EmNacvFMXuZyHS1n38=";
allowedIPs = [ "10.8.0.2/32" ];
}
# Roamer
@ -77,11 +73,6 @@
publicKey = "gS5VIUFL74kTs3zxVNT/ijWyOjeAFLEqWynD0Pefh1o=";
allowedIPs = [ "10.8.0.3/32" ];
}
# Panacea
{
publicKey = "XMkTztU2Y8hw6Fu/2o4Gszij+EmNacvFMXuZyHS1n38=";
allowedIPs = [ "10.8.0.4/32" ];
}
];
};
};

View File

@ -1,11 +1,7 @@
# CUPS and SANE configuration
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
environment.systemPackages = with pkgs; [
cups
sane-backends
];
environment.systemPackages = with pkgs; [ cups sane-backends ];
# Enable CUPS with Zeroconf
services.printing = {
@ -30,8 +26,6 @@
'';
};
users.users.scanner = {
extraGroups = [ "lp" ];
};
users.users.scanner = { extraGroups = [ "lp" ]; };
}