Compare commits
3 commits
f69363ab48
...
edd2c61b17
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edd2c61b17 | ||
|
|
70e908fcb0 | ||
|
|
9b7f98df7d |
2
.github/README.md
vendored
|
|
@ -109,7 +109,7 @@
|
||||||
<details>
|
<details>
|
||||||
<summary>Click here for a summary of my infrastructure</summary>
|
<summary>Click here for a summary of my infrastructure</summary>
|
||||||
|
|
||||||
<img width="3854" height="7060" alt="topology" src="https://github.com/user-attachments/assets/fc557fdb-b779-4530-ae19-93ff019a2b29" />
|
<img width="4250" height="9117" alt="topology" src="https://github.com/user-attachments/assets/582264cf-f239-4699-b90f-69f2cef5a7b2" />
|
||||||
|
|
||||||
|
|
||||||
### Programs
|
### Programs
|
||||||
|
|
|
||||||
|
|
@ -1736,8 +1736,8 @@ A short overview over each input and what it does:
|
||||||
nixpkgs-stable25_11.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs-stable25_11.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
# url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
url = "github:Swarsel/home-manager/main";
|
# url = "github:Swarsel/home-manager/main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nix-index-database = {
|
nix-index-database = {
|
||||||
|
|
@ -2662,7 +2662,8 @@ Another note concerning [[https://flake.parts/][flake-parts]]:
|
||||||
|
|
||||||
ender3 = mkDevice "Ender 3" {
|
ender3 = mkDevice "Ender 3" {
|
||||||
info = "SKR V1.3, TMC2209 (Dual), TFT35";
|
info = "SKR V1.3, TMC2209 (Dual), TFT35";
|
||||||
image = "${self}/files/topology-images/ender3.png";
|
deviceIcon = "${self}/files/topology-images/ender3.png";
|
||||||
|
icon = "${self}/files/topology-images/raspi.png";
|
||||||
interfaces.eth1 = { };
|
interfaces.eth1 = { };
|
||||||
services = {
|
services = {
|
||||||
octoprint = {
|
octoprint = {
|
||||||
|
|
@ -2703,11 +2704,11 @@ Another note concerning [[https://flake.parts/][flake-parts]]:
|
||||||
services = {
|
services = {
|
||||||
ollama = {
|
ollama = {
|
||||||
name = "Ollama";
|
name = "Ollama";
|
||||||
icon = "${self}/files/topology-images/ollama.png";
|
icon = "services.ollama";
|
||||||
};
|
};
|
||||||
openwebui = {
|
openwebui = {
|
||||||
name = "Open WebUI";
|
name = "Open WebUI";
|
||||||
icon = "${self}/files/topology-images/openwebui.png";
|
icon = "services.open-webui";
|
||||||
};
|
};
|
||||||
comfyui = {
|
comfyui = {
|
||||||
name = "Comfy UI";
|
name = "Comfy UI";
|
||||||
|
|
@ -6207,7 +6208,7 @@ This machine mainly acts as my proxy server to stand before my local machines.
|
||||||
};
|
};
|
||||||
restic.targets = {
|
restic.targets = {
|
||||||
SwarselMoonside = {
|
SwarselMoonside = {
|
||||||
repository = config.repo.secrets.local.resticRepoState;
|
repository = config.repo.secrets.local.resticRepo;
|
||||||
paths = [
|
paths = [
|
||||||
"/persist/opt/minecraft"
|
"/persist/opt/minecraft"
|
||||||
];
|
];
|
||||||
|
|
@ -11347,22 +11348,7 @@ This is a collection of packages that are useful for server-type hosts that do n
|
||||||
services = {
|
services = {
|
||||||
# add a user with sudo smbpasswd -a <user>
|
# add a user with sudo smbpasswd -a <user>
|
||||||
samba = {
|
samba = {
|
||||||
# package = pkgs.samba4Full;
|
|
||||||
package = pkgs.samba4;
|
package = pkgs.samba4;
|
||||||
# extraConfig = ''
|
|
||||||
# workgroup = WORKGROUP
|
|
||||||
# server role = standalone server
|
|
||||||
# dns proxy = no
|
|
||||||
|
|
||||||
# pam password change = yes
|
|
||||||
# map to guest = bad user
|
|
||||||
# create mask = 0664
|
|
||||||
# force create mode = 0664
|
|
||||||
# directory mask = 0775
|
|
||||||
# force directory mode = 0775
|
|
||||||
# follow symlinks = yes
|
|
||||||
# '';
|
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settings.Eternor = {
|
settings.Eternor = {
|
||||||
|
|
@ -12727,11 +12713,7 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
|
||||||
sops.secrets.kavita-token = { inherit sopsFile; owner = serviceUser; };
|
sops.secrets.kavita-token = { inherit sopsFile; owner = serviceUser; };
|
||||||
|
|
||||||
# networking.firewall.allowedTCPPorts = [ servicePort ];
|
# networking.firewall.allowedTCPPorts = [ servicePort ];
|
||||||
topology.self.services.${serviceName} = {
|
topology.self.services.${serviceName}.info = "https://${serviceDomain}";
|
||||||
name = "Kavita";
|
|
||||||
info = "https://${serviceDomain}";
|
|
||||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
||||||
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
||||||
|
|
@ -13149,9 +13131,8 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
|
||||||
];
|
];
|
||||||
|
|
||||||
topology.self.services.${serviceName} = {
|
topology.self.services.${serviceName} = {
|
||||||
name = lib.toUpper serviceName;
|
|
||||||
info = "http://localhost:${builtins.toString servicePort}";
|
info = "http://localhost:${builtins.toString servicePort}";
|
||||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
icon = lib.mkForce "${self}/files/topology-images/mpd.png";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
||||||
|
|
@ -13160,13 +13141,14 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
|
||||||
|
|
||||||
services.${serviceName} = {
|
services.${serviceName} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
musicDirectory = "/storage/Music";
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
music_directory = "/storage/Music";
|
||||||
|
bind_to_address = "any";
|
||||||
|
port = servicePort;
|
||||||
|
};
|
||||||
user = serviceUser;
|
user = serviceUser;
|
||||||
group = serviceGroup;
|
group = serviceGroup;
|
||||||
network = {
|
|
||||||
port = servicePort;
|
|
||||||
listenAddress = "any";
|
|
||||||
};
|
|
||||||
credentials = [
|
credentials = [
|
||||||
{
|
{
|
||||||
passwordFile = config.sops.secrets.mpd-pw.path;
|
passwordFile = config.sops.secrets.mpd-pw.path;
|
||||||
|
|
@ -13234,13 +13216,6 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
|
||||||
options.swarselmodules.server.${serviceName} = lib.mkEnableOption "enable ${serviceName} on server";
|
options.swarselmodules.server.${serviceName} = lib.mkEnableOption "enable ${serviceName} on server";
|
||||||
config = lib.mkIf config.swarselmodules.server.${serviceName} {
|
config = lib.mkIf config.swarselmodules.server.${serviceName} {
|
||||||
|
|
||||||
topology.self.services = {
|
|
||||||
${serviceName} = {
|
|
||||||
name = lib.swarselsystems.toCapitalized serviceName;
|
|
||||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
${serviceName} = {
|
${serviceName} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -13388,19 +13363,13 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
|
||||||
|
|
||||||
# networking.firewall.allowedTCPPorts = [ servicePort federationPort ];
|
# networking.firewall.allowedTCPPorts = [ servicePort federationPort ];
|
||||||
|
|
||||||
topology.self.services = {
|
topology.self.services = lib.listToAttrs (map
|
||||||
${serviceName} = {
|
|
||||||
name = lib.swarselsystems.toCapitalized serviceName;
|
|
||||||
info = "https://${serviceDomain}";
|
|
||||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
|
||||||
};
|
|
||||||
} // (lib.listToAttrs (map
|
|
||||||
(service:
|
(service:
|
||||||
lib.nameValuePair "mautrix-${service}" {
|
lib.nameValuePair "mautrix-${service}" {
|
||||||
name = "mautrix-${service}";
|
name = "mautrix-${service}";
|
||||||
icon = "${self}/files/topology-images/mautrix.png";
|
icon = "${self}/files/topology-images/mautrix.png";
|
||||||
})
|
})
|
||||||
[ "whatsapp" "signal" "telegram" ]));
|
[ "whatsapp" "signal" "telegram" ]);
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
timers."restart-bridges" = {
|
timers."restart-bridges" = {
|
||||||
|
|
@ -14463,8 +14432,7 @@ Note: you still need to run =restic-<name> init= once on the host to get the buc
|
||||||
{ lib, pkgs, config, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
inherit (config.swarselsystems) sopsFile;
|
inherit (config.swarselsystems) sopsFile;
|
||||||
|
inherit (config.swarselsystems.server.restic) targets;
|
||||||
targets = config.swarselsystems.server.restic.targets;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.swarselmodules.server.restic = lib.mkEnableOption "enable restic backups on server";
|
options.swarselmodules.server.restic = lib.mkEnableOption "enable restic backups on server";
|
||||||
|
|
@ -15296,7 +15264,7 @@ FreshRSS claims to support HTTP header auth, but at least it does not work with
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
||||||
directories = [{ directory = "/var/lib/private/${serviceName}"; }];
|
directories = [{ directory = "/var/lib/private/anki-sync-server"; }];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.anki-sync-server = {
|
services.anki-sync-server = {
|
||||||
|
|
@ -16164,7 +16132,7 @@ kanidm person credential create-reset-token <user>
|
||||||
|
|
||||||
postgresUser = config.systemd.services.postgresql.serviceConfig.User; # postgres
|
postgresUser = config.systemd.services.postgresql.serviceConfig.User; # postgres
|
||||||
postgresPort = config.services.postgresql.settings.port; # 5432
|
postgresPort = config.services.postgresql.settings.port; # 5432
|
||||||
containerRev = "sha256:96693e41a6eb2aae44f96033a090378270f024ddf4e6095edf8d57674f21095d";
|
containerRev = "sha256:bb8ad2b6891441d8ec5c3169b684b71574f3bb3e9afb345bad2f91d833d60340";
|
||||||
|
|
||||||
inherit (config.swarselsystems) sopsFile;
|
inherit (config.swarselsystems) sopsFile;
|
||||||
in
|
in
|
||||||
|
|
@ -16834,7 +16802,7 @@ Deployment notes:
|
||||||
- finally, disable new user registration in web ui
|
- finally, disable new user registration in web ui
|
||||||
|
|
||||||
#+begin_src nix-ts :tangle modules/nixos/server/slink.nix
|
#+begin_src nix-ts :tangle modules/nixos/server/slink.nix
|
||||||
{ self, lib, config, dns, globals, confLib, ... }:
|
{ lib, config, dns, globals, confLib, ... }:
|
||||||
let
|
let
|
||||||
inherit (confLib.gen { name = "slink"; port = 3000; dir = "/var/lib/slink"; }) servicePort serviceName serviceDomain serviceDir serviceAddress proxyAddress4 proxyAddress6;
|
inherit (confLib.gen { name = "slink"; port = 3000; dir = "/var/lib/slink"; }) servicePort serviceName serviceDomain serviceDir serviceAddress proxyAddress4 proxyAddress6;
|
||||||
inherit (confLib.static) isHome isProxied webProxy homeWebProxy dnsServer homeProxyIf webProxyIf homeServiceAddress nginxAccessRules;
|
inherit (confLib.static) isHome isProxied webProxy homeWebProxy dnsServer homeProxyIf webProxyIf homeServiceAddress nginxAccessRules;
|
||||||
|
|
@ -16893,7 +16861,7 @@ in
|
||||||
topology.self.services.${serviceName} = {
|
topology.self.services.${serviceName} = {
|
||||||
name = lib.swarselsystems.toCapitalized serviceName;
|
name = lib.swarselsystems.toCapitalized serviceName;
|
||||||
info = "https://${serviceDomain}";
|
info = "https://${serviceDomain}";
|
||||||
icon = "${self}/files/topology-images/shlink.png";
|
icon = "services.not-available";
|
||||||
};
|
};
|
||||||
|
|
||||||
globals = {
|
globals = {
|
||||||
|
|
@ -17081,13 +17049,6 @@ in
|
||||||
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.homebox = {
|
|
||||||
environment = {
|
|
||||||
TMPDIR = "/var/lib/homebox/.tmp";
|
|
||||||
HOME = "/var/lib/homebox";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.${serviceName} = {
|
services.${serviceName} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.bisect.homebox;
|
package = pkgs.bisect.homebox;
|
||||||
|
|
@ -19085,7 +19046,7 @@ This has some state:
|
||||||
];
|
];
|
||||||
dhcp.enabled = false;
|
dhcp.enabled = false;
|
||||||
};
|
};
|
||||||
filtering.rewrites = map
|
filtering.rewrites = (map
|
||||||
(domain: {
|
(domain: {
|
||||||
inherit domain;
|
inherit domain;
|
||||||
# FIXME: change to homeWebProxy once that is setup
|
# FIXME: change to homeWebProxy once that is setup
|
||||||
|
|
@ -19093,7 +19054,13 @@ This has some state:
|
||||||
# answer = globals.hosts.${webProxy}.wanAddress4;
|
# answer = globals.hosts.${webProxy}.wanAddress4;
|
||||||
enabled = true;
|
enabled = true;
|
||||||
})
|
})
|
||||||
homeDomains;
|
homeDomains) ++ [
|
||||||
|
{
|
||||||
|
domain = "smb.${globals.domains.main}";
|
||||||
|
answer = globals.networks.home-lan.vlans.services.hosts.storage.ipv4;
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
filters = [
|
filters = [
|
||||||
{
|
{
|
||||||
name = "AdGuard DNS filter";
|
name = "AdGuard DNS filter";
|
||||||
|
|
@ -25156,16 +25123,20 @@ When setting up a new machine:
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.user.tmpfiles.rules = [
|
||||||
|
"d ${homeDir}/.gnupg 0700 ${mainUser} users - -"
|
||||||
|
];
|
||||||
|
|
||||||
# assure correct permissions
|
# assure correct permissions
|
||||||
systemd.user.tmpfiles.settings."30-gpgagent".rules = {
|
# systemd.user.tmpfiles.settings."30-gpgagent".rules = {
|
||||||
"${homeDir}/.gnupg" = {
|
# "${homeDir}/.gnupg" = {
|
||||||
d = {
|
# d = {
|
||||||
group = "users";
|
# group = "users";
|
||||||
user = mainUser;
|
# user = mainUser;
|
||||||
mode = "0700";
|
# mode = "0700";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -37573,7 +37544,7 @@ Here lies defined the readme for GitHub and Forgejo:
|
||||||
<details>
|
<details>
|
||||||
<summary>Click here for a summary of my infrastructure</summary>
|
<summary>Click here for a summary of my infrastructure</summary>
|
||||||
|
|
||||||
<img width="3854" height="7060" alt="topology" src="https://github.com/user-attachments/assets/fc557fdb-b779-4530-ae19-93ff019a2b29" />
|
<img width="4250" height="9117" alt="topology" src="https://github.com/user-attachments/assets/582264cf-f239-4699-b90f-69f2cef5a7b2" />
|
||||||
|
|
||||||
|
|
||||||
### Programs
|
### Programs
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 393 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 870 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 329 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 293 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 10 KiB |
BIN
files/topology-images/raspi.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 3 MiB |
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 142 KiB |
958
flake.lock
generated
|
|
@ -36,8 +36,8 @@
|
||||||
nixpkgs-stable25_11.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs-stable25_11.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
# url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
url = "github:Swarsel/home-manager/main";
|
# url = "github:Swarsel/home-manager/main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nix-index-database = {
|
nix-index-database = {
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ in
|
||||||
};
|
};
|
||||||
restic.targets = {
|
restic.targets = {
|
||||||
SwarselMoonside = {
|
SwarselMoonside = {
|
||||||
repository = config.repo.secrets.local.resticRepoState;
|
repository = config.repo.secrets.local.resticRepo;
|
||||||
paths = [
|
paths = [
|
||||||
"/persist/opt/minecraft"
|
"/persist/opt/minecraft"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -36,16 +36,20 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.user.tmpfiles.rules = [
|
||||||
|
"d ${homeDir}/.gnupg 0700 ${mainUser} users - -"
|
||||||
|
];
|
||||||
|
|
||||||
# assure correct permissions
|
# assure correct permissions
|
||||||
systemd.user.tmpfiles.settings."30-gpgagent".rules = {
|
# systemd.user.tmpfiles.settings."30-gpgagent".rules = {
|
||||||
"${homeDir}/.gnupg" = {
|
# "${homeDir}/.gnupg" = {
|
||||||
d = {
|
# d = {
|
||||||
group = "users";
|
# group = "users";
|
||||||
user = mainUser;
|
# user = mainUser;
|
||||||
mode = "0700";
|
# mode = "0700";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ in
|
||||||
];
|
];
|
||||||
dhcp.enabled = false;
|
dhcp.enabled = false;
|
||||||
};
|
};
|
||||||
filtering.rewrites = map
|
filtering.rewrites = (map
|
||||||
(domain: {
|
(domain: {
|
||||||
inherit domain;
|
inherit domain;
|
||||||
# FIXME: change to homeWebProxy once that is setup
|
# FIXME: change to homeWebProxy once that is setup
|
||||||
|
|
@ -67,7 +67,13 @@ in
|
||||||
# answer = globals.hosts.${webProxy}.wanAddress4;
|
# answer = globals.hosts.${webProxy}.wanAddress4;
|
||||||
enabled = true;
|
enabled = true;
|
||||||
})
|
})
|
||||||
homeDomains;
|
homeDomains) ++ [
|
||||||
|
{
|
||||||
|
domain = "smb.${globals.domains.main}";
|
||||||
|
answer = globals.networks.home-lan.vlans.services.hosts.storage.ipv4;
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
filters = [
|
filters = [
|
||||||
{
|
{
|
||||||
name = "AdGuard DNS filter";
|
name = "AdGuard DNS filter";
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
||||||
directories = [{ directory = "/var/lib/private/${serviceName}"; }];
|
directories = [{ directory = "/var/lib/private/anki-sync-server"; }];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.anki-sync-server = {
|
services.anki-sync-server = {
|
||||||
|
|
|
||||||
|
|
@ -41,13 +41,6 @@ in
|
||||||
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.homebox = {
|
|
||||||
environment = {
|
|
||||||
TMPDIR = "/var/lib/homebox/.tmp";
|
|
||||||
HOME = "/var/lib/homebox";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.${serviceName} = {
|
services.${serviceName} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.bisect.homebox;
|
package = pkgs.bisect.homebox;
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,7 @@ in
|
||||||
sops.secrets.kavita-token = { inherit sopsFile; owner = serviceUser; };
|
sops.secrets.kavita-token = { inherit sopsFile; owner = serviceUser; };
|
||||||
|
|
||||||
# networking.firewall.allowedTCPPorts = [ servicePort ];
|
# networking.firewall.allowedTCPPorts = [ servicePort ];
|
||||||
topology.self.services.${serviceName} = {
|
topology.self.services.${serviceName}.info = "https://${serviceDomain}";
|
||||||
name = "Kavita";
|
|
||||||
info = "https://${serviceDomain}";
|
|
||||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
||||||
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ let
|
||||||
|
|
||||||
postgresUser = config.systemd.services.postgresql.serviceConfig.User; # postgres
|
postgresUser = config.systemd.services.postgresql.serviceConfig.User; # postgres
|
||||||
postgresPort = config.services.postgresql.settings.port; # 5432
|
postgresPort = config.services.postgresql.settings.port; # 5432
|
||||||
containerRev = "sha256:96693e41a6eb2aae44f96033a090378270f024ddf4e6095edf8d57674f21095d";
|
containerRev = "sha256:bb8ad2b6891441d8ec5c3169b684b71574f3bb3e9afb345bad2f91d833d60340";
|
||||||
|
|
||||||
inherit (config.swarselsystems) sopsFile;
|
inherit (config.swarselsystems) sopsFile;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -63,19 +63,13 @@ in
|
||||||
|
|
||||||
# networking.firewall.allowedTCPPorts = [ servicePort federationPort ];
|
# networking.firewall.allowedTCPPorts = [ servicePort federationPort ];
|
||||||
|
|
||||||
topology.self.services = {
|
topology.self.services = lib.listToAttrs (map
|
||||||
${serviceName} = {
|
|
||||||
name = lib.swarselsystems.toCapitalized serviceName;
|
|
||||||
info = "https://${serviceDomain}";
|
|
||||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
|
||||||
};
|
|
||||||
} // (lib.listToAttrs (map
|
|
||||||
(service:
|
(service:
|
||||||
lib.nameValuePair "mautrix-${service}" {
|
lib.nameValuePair "mautrix-${service}" {
|
||||||
name = "mautrix-${service}";
|
name = "mautrix-${service}";
|
||||||
icon = "${self}/files/topology-images/mautrix.png";
|
icon = "${self}/files/topology-images/mautrix.png";
|
||||||
})
|
})
|
||||||
[ "whatsapp" "signal" "telegram" ]));
|
[ "whatsapp" "signal" "telegram" ]);
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
timers."restart-bridges" = {
|
timers."restart-bridges" = {
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,8 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
topology.self.services.${serviceName} = {
|
topology.self.services.${serviceName} = {
|
||||||
name = lib.toUpper serviceName;
|
|
||||||
info = "http://localhost:${builtins.toString servicePort}";
|
info = "http://localhost:${builtins.toString servicePort}";
|
||||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
icon = lib.mkForce "${self}/files/topology-images/mpd.png";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
||||||
|
|
@ -42,13 +41,14 @@ in
|
||||||
|
|
||||||
services.${serviceName} = {
|
services.${serviceName} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
musicDirectory = "/storage/Music";
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
music_directory = "/storage/Music";
|
||||||
|
bind_to_address = "any";
|
||||||
|
port = servicePort;
|
||||||
|
};
|
||||||
user = serviceUser;
|
user = serviceUser;
|
||||||
group = serviceGroup;
|
group = serviceGroup;
|
||||||
network = {
|
|
||||||
port = servicePort;
|
|
||||||
listenAddress = "any";
|
|
||||||
};
|
|
||||||
credentials = [
|
credentials = [
|
||||||
{
|
{
|
||||||
passwordFile = config.sops.secrets.mpd-pw.path;
|
passwordFile = config.sops.secrets.mpd-pw.path;
|
||||||
|
|
|
||||||
|
|
@ -19,22 +19,7 @@ in
|
||||||
services = {
|
services = {
|
||||||
# add a user with sudo smbpasswd -a <user>
|
# add a user with sudo smbpasswd -a <user>
|
||||||
samba = {
|
samba = {
|
||||||
# package = pkgs.samba4Full;
|
|
||||||
package = pkgs.samba4;
|
package = pkgs.samba4;
|
||||||
# extraConfig = ''
|
|
||||||
# workgroup = WORKGROUP
|
|
||||||
# server role = standalone server
|
|
||||||
# dns proxy = no
|
|
||||||
|
|
||||||
# pam password change = yes
|
|
||||||
# map to guest = bad user
|
|
||||||
# create mask = 0664
|
|
||||||
# force create mode = 0664
|
|
||||||
# directory mask = 0775
|
|
||||||
# force directory mode = 0775
|
|
||||||
# follow symlinks = yes
|
|
||||||
# '';
|
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settings.Eternor = {
|
settings.Eternor = {
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,6 @@ in
|
||||||
options.swarselmodules.server.${serviceName} = lib.mkEnableOption "enable ${serviceName} on server";
|
options.swarselmodules.server.${serviceName} = lib.mkEnableOption "enable ${serviceName} on server";
|
||||||
config = lib.mkIf config.swarselmodules.server.${serviceName} {
|
config = lib.mkIf config.swarselmodules.server.${serviceName} {
|
||||||
|
|
||||||
topology.self.services = {
|
|
||||||
${serviceName} = {
|
|
||||||
name = lib.swarselsystems.toCapitalized serviceName;
|
|
||||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
${serviceName} = {
|
${serviceName} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
{ lib, pkgs, config, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
inherit (config.swarselsystems) sopsFile;
|
inherit (config.swarselsystems) sopsFile;
|
||||||
|
inherit (config.swarselsystems.server.restic) targets;
|
||||||
targets = config.swarselsystems.server.restic.targets;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.swarselmodules.server.restic = lib.mkEnableOption "enable restic backups on server";
|
options.swarselmodules.server.restic = lib.mkEnableOption "enable restic backups on server";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ self, lib, config, dns, globals, confLib, ... }:
|
{ lib, config, dns, globals, confLib, ... }:
|
||||||
let
|
let
|
||||||
inherit (confLib.gen { name = "slink"; port = 3000; dir = "/var/lib/slink"; }) servicePort serviceName serviceDomain serviceDir serviceAddress proxyAddress4 proxyAddress6;
|
inherit (confLib.gen { name = "slink"; port = 3000; dir = "/var/lib/slink"; }) servicePort serviceName serviceDomain serviceDir serviceAddress proxyAddress4 proxyAddress6;
|
||||||
inherit (confLib.static) isHome isProxied webProxy homeWebProxy dnsServer homeProxyIf webProxyIf homeServiceAddress nginxAccessRules;
|
inherit (confLib.static) isHome isProxied webProxy homeWebProxy dnsServer homeProxyIf webProxyIf homeServiceAddress nginxAccessRules;
|
||||||
|
|
@ -57,7 +57,7 @@ in
|
||||||
topology.self.services.${serviceName} = {
|
topology.self.services.${serviceName} = {
|
||||||
name = lib.swarselsystems.toCapitalized serviceName;
|
name = lib.swarselsystems.toCapitalized serviceName;
|
||||||
info = "https://${serviceDomain}";
|
info = "https://${serviceDomain}";
|
||||||
icon = "${self}/files/topology-images/shlink.png";
|
icon = "services.not-available";
|
||||||
};
|
};
|
||||||
|
|
||||||
globals = {
|
globals = {
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,8 @@
|
||||||
|
|
||||||
ender3 = mkDevice "Ender 3" {
|
ender3 = mkDevice "Ender 3" {
|
||||||
info = "SKR V1.3, TMC2209 (Dual), TFT35";
|
info = "SKR V1.3, TMC2209 (Dual), TFT35";
|
||||||
image = "${self}/files/topology-images/ender3.png";
|
deviceIcon = "${self}/files/topology-images/ender3.png";
|
||||||
|
icon = "${self}/files/topology-images/raspi.png";
|
||||||
interfaces.eth1 = { };
|
interfaces.eth1 = { };
|
||||||
services = {
|
services = {
|
||||||
octoprint = {
|
octoprint = {
|
||||||
|
|
@ -233,11 +234,11 @@
|
||||||
services = {
|
services = {
|
||||||
ollama = {
|
ollama = {
|
||||||
name = "Ollama";
|
name = "Ollama";
|
||||||
icon = "${self}/files/topology-images/ollama.png";
|
icon = "services.ollama";
|
||||||
};
|
};
|
||||||
openwebui = {
|
openwebui = {
|
||||||
name = "Open WebUI";
|
name = "Open WebUI";
|
||||||
icon = "${self}/files/topology-images/openwebui.png";
|
icon = "services.open-webui";
|
||||||
};
|
};
|
||||||
comfyui = {
|
comfyui = {
|
||||||
name = "Comfy UI";
|
name = "Comfy UI";
|
||||||
|
|
|
||||||