refactoring and cleaning up

This commit is contained in:
CDaut 2025-10-31 21:29:30 +01:00
parent 7113bb629a
commit 8df968546d
Signed by: clara
GPG key ID: 223391B52FAD4463
15 changed files with 169 additions and 161 deletions

View file

@ -4,6 +4,7 @@
targetHost = "192.168.178.37";
targetPort = 22;
targetUser = "root";
tags = [ "cube" ];
};
networking.hostName = "forgejo";
networking.interfaces.wgbr.ipv4.addresses = [
@ -13,7 +14,8 @@
}
];
imports = [
../container_config.nix
../services/forgejo.nix
../../container_config.nix
../../services/forgejo.nix
];
}

View file

@ -4,6 +4,7 @@
targetHost = "192.168.178.81";
targetPort = 22;
targetUser = "root";
tags = [ "cube" ];
};
networking.hostName = "mastodon";
networking.interfaces.wgbr.ipv4.addresses = [
@ -13,7 +14,7 @@
}
];
imports = [
../container_config.nix
../services/mastodon.nix
../../container_config.nix
../../services/mastodon.nix
];
}

View file

@ -4,6 +4,7 @@
targetHost = "192.168.178.107";
targetPort = 22;
targetUser = "root";
tags = [ "cube" ];
};
networking.hostName = "paperless";
networking.interfaces.wgbr.ipv4.addresses = [
@ -13,7 +14,7 @@
}
];
imports = [
../container_config.nix
../services/vikunja.nix
../../container_config.nix
../../services/vikunja.nix
];
}

View file

@ -3,10 +3,11 @@
targetHost = "192.168.178.123";
targetPort = 22;
targetUser = "root";
tags = [ "cube" ];
};
networking.hostName = "wireguard";
imports = [
../container_config.nix
../services/wireguard.nix
../../container_config.nix
../../services/wireguard.nix
];
}

View file

@ -3,6 +3,7 @@
targetHost = "192.168.178.110";
targetPort = 22;
targetUser = "root";
tags = [ "cube" ];
};
networking.hostName = "zammad";
networking.interfaces.wgbr.ipv4.addresses = [
@ -12,7 +13,7 @@
}
];
imports = [
../container_config.nix
../services/zammad.nix
../../container_config.nix
../../services/zammad.nix
];
}

View file

@ -1,19 +0,0 @@
{ lib, pkgs, config, ... }: {
deployment = {
targetHost = "192.168.178.65";
targetPort = 22;
targetUser = "root";
};
networking.hostName = "mcserver";
networking.interfaces.wgbr.ipv4.addresses = [
{
address = "10.8.1.2";
prefixLength = 24;
}
];
imports = [
../container_config.nix
#../services/minecraft-server.nix
];
}

View file

@ -4,6 +4,7 @@
targetHost = "10.0.0.2";
targetPort = 22;
targetUser = "root";
tags = [ "netcup_pve" ];
};
networking = {
hostName = "nginx";
@ -17,7 +18,7 @@
};
};
imports = [
../container_config.nix
../services/nginx.nix
../../container_config.nix
../../services/nginx.nix
];
}

View file

@ -0,0 +1,14 @@
{ lib, pkgs, config, ... }:
{
deployment = {
targetHost = "10.0.0.3";
targetPort = 22;
targetUser = "root";
tags = [ "netcup_pve" ];
};
networking.hostName = "wireguard";
imports = [
../../container_config.nix
];
}

View file

@ -1,66 +0,0 @@
{ lib, pkgs, config, ... }:
let paperless_dir = "/mnt/paperless_dir";
in {
deployment = {
targetHost = "192.168.178.101";
targetPort = 22;
targetUser = "root";
};
networking.hostName = "paperless";
networking.interfaces.wgbr.ipv4.addresses = [
{
address = "10.8.1.7";
prefixLength = 24;
}
];
imports = [
../container_config.nix
../services/paperless.nix
];
# set up secret key
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
smb_uname.sopsFile = ../../secrets/paperless/secrets.yaml;
smb_pass.sopsFile = ../../secrets/paperless/secrets.yaml;
};
templates."cifs-credentials".content = ''
username=${config.sops.placeholder.smb_uname}
password=${config.sops.placeholder.smb_pass}
'';
};
# Mount paperless directory
environment.systemPackages = [ pkgs.cifs-utils ];
systemd.tmpfiles.rules = [
"d ${paperless_dir} 0777 paperless paperless 99999y"
];
fileSystems.${paperless_dir} = {
device = "//10.8.1.5/milo_paperless";
fsType = "cifs";
options =
let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in
[
"${automount_opts}"
"credentials=${config.sops.templates."cifs-credentials".path}"
"uid=paperless,gid=paperless"
];
};
# Paperless needs the share to be mounted
systemd.user.services."paperless-web.service".requires = [
"mnt-paperless_dir.mount"
];
systemd.user.services."paperless-scheduler.service".requires = [
"mnt-paperless_dir.mount"
];
}