Compare commits

...

3 commits

Author SHA1 Message Date
Leon Schwarzäugl
edd2c61b17
fix: long topology rendering times
Some checks failed
Build and Deploy / build (push) Has been cancelled
Flake check / Check flake (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled
2026-01-24 01:16:29 +01:00
Leon Schwarzäugl
70e908fcb0
chore: update flake 2026-01-23 22:13:31 +01:00
Leon Schwarzäugl
9b7f98df7d
feat: update topology 2026-01-20 15:39:18 +01:00
64 changed files with 568 additions and 704 deletions

2
.github/README.md vendored
View file

@ -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

View file

@ -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";
@ -25118,57 +25085,61 @@ When setting up a new machine:
#+end_src #+end_src
#+begin_src nix-ts :tangle modules/home/common/gpg-agent.nix #+begin_src nix-ts :tangle modules/home/common/gpg-agent.nix
{ self, lib, config, pkgs, ... }: { self, lib, config, pkgs, ... }:
let let
inherit (config.swarselsystems) mainUser homeDir; inherit (config.swarselsystems) mainUser homeDir;
in in
{ {
options.swarselmodules.gpgagent = lib.mkEnableOption "gpg agent settings"; options.swarselmodules.gpgagent = lib.mkEnableOption "gpg agent settings";
config = lib.mkIf config.swarselmodules.gpgagent { config = lib.mkIf config.swarselmodules.gpgagent {
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
verbose = true; verbose = true;
enableZshIntegration = true; enableZshIntegration = true;
enableScDaemon = true; enableScDaemon = true;
enableSshSupport = true; enableSshSupport = true;
enableExtraSocket = true; enableExtraSocket = true;
pinentry.package = pkgs.wayprompt; pinentry.package = pkgs.wayprompt;
pinentry.program = "pinentry-wayprompt"; pinentry.program = "pinentry-wayprompt";
# pinentry.package = pkgs.pinentry.gtk2; # pinentry.package = pkgs.pinentry.gtk2;
defaultCacheTtl = 600; defaultCacheTtl = 600;
maxCacheTtl = 7200; maxCacheTtl = 7200;
extraConfig = '' extraConfig = ''
allow-loopback-pinentry allow-loopback-pinentry
allow-emacs-pinentry allow-emacs-pinentry
''; '';
sshKeys = [ sshKeys = [
"4BE7925262289B476DBBC17B76FD3810215AE097" "4BE7925262289B476DBBC17B76FD3810215AE097"
]; ];
};
programs.gpg = {
enable = true;
publicKeys = [
{
source = "${self}/secrets/public/gpg/gpg-public-key-0x76FD3810215AE097.asc";
trust = 5;
}
];
};
# assure correct permissions
systemd.user.tmpfiles.settings."30-gpgagent".rules = {
"${homeDir}/.gnupg" = {
d = {
group = "users";
user = mainUser;
mode = "0700";
}; };
};
};
};
} programs.gpg = {
enable = true;
publicKeys = [
{
source = "${self}/secrets/public/gpg/gpg-public-key-0x76FD3810215AE097.asc";
trust = 5;
}
];
};
systemd.user.tmpfiles.rules = [
"d ${homeDir}/.gnupg 0700 ${mainUser} users - -"
];
# assure correct permissions
# systemd.user.tmpfiles.settings."30-gpgagent".rules = {
# "${homeDir}/.gnupg" = {
# d = {
# group = "users";
# user = mainUser;
# mode = "0700";
# };
# };
# };
};
}
#+end_src #+end_src
**** gammastep **** gammastep
@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 3 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 142 KiB

Before After
Before After

958
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -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 = {

View file

@ -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"
]; ];

View file

@ -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";
}; # };
}; # };
}; # };
}; };
} }

View file

@ -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";

View file

@ -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 = {

View file

@ -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;

View file

@ -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; }];

View file

@ -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

View file

@ -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" = {

View file

@ -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;

View file

@ -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 = {

View file

@ -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;

View file

@ -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";

View file

@ -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 = {

View file

@ -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";