updates
This commit is contained in:
parent
a1cec54ec8
commit
ccbbb7f26e
18 changed files with 441 additions and 248 deletions
|
@ -9,3 +9,4 @@
|
|||
|
||||
system.stateVersion = lib.mkDefault "24.05";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,42 +1,82 @@
|
|||
{ config, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hostAddress = "10.42.99.1";
|
||||
hostAddress6 = "fc00::1";
|
||||
in {
|
||||
in
|
||||
{
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
internalInterfaces = [ "ve-+" ];
|
||||
externalInterface = "ens18";
|
||||
# Lazy IPv6 connectivity for the container
|
||||
enableIPv6 = true;
|
||||
|
||||
forwardPorts = [
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8384
|
||||
22000
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
22000
|
||||
21027
|
||||
];
|
||||
|
||||
# Containers network is
|
||||
# * 10.42.99.0/24
|
||||
# * fc00:x
|
||||
|
||||
users.groups.backup = {
|
||||
gid = 10000;
|
||||
members = [ "vivian" ];
|
||||
};
|
||||
|
||||
containers = {
|
||||
dns = {
|
||||
syncthing = {
|
||||
autoStart = true;
|
||||
inherit hostAddress hostAddress6;
|
||||
localAddress = "10.42.99.2";
|
||||
localAddress6 = "fc00::2";
|
||||
|
||||
specialArgs = { inherit inputs; };
|
||||
forwardPorts = [
|
||||
{
|
||||
containerPort = 8384;
|
||||
hostPort = 8384;
|
||||
protocol = "tcp";
|
||||
}
|
||||
];
|
||||
|
||||
config = {pkgs, ...}: {
|
||||
imports = [
|
||||
./common.nix
|
||||
# ./dns.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.gnome-autounlock-keyring.nixosModules.default
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
];
|
||||
bindMounts = {
|
||||
"/data" = {
|
||||
hostPath = "/mnt/backup";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
config =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.groups.backup = {
|
||||
gid = 10000;
|
||||
members = [ "syncthing" ];
|
||||
};
|
||||
|
||||
imports = [
|
||||
./common.nix
|
||||
./syncthing.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.gnome-autounlock-keyring.nixosModules.default
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
8
hosts/olympus/bastion/containers/syncthing.nix
Normal file
8
hosts/olympus/bastion/containers/syncthing.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
guiAddress = "0.0.0.0:8384";
|
||||
};
|
||||
}
|
|
@ -19,6 +19,13 @@
|
|||
mac = "82:F0:7C:CB:BD:6D";
|
||||
};
|
||||
|
||||
services.scrutiny = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
influxdb.enable = true;
|
||||
collector.enable = false;
|
||||
};
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue