Compare commits
3 commits
f69363ab48
...
edd2c61b17
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edd2c61b17 | ||
|
|
70e908fcb0 | ||
|
|
9b7f98df7d |
2
.github/README.md
vendored
|
|
@ -109,7 +109,7 @@
|
|||
<details>
|
||||
<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
|
||||
|
|
|
|||
|
|
@ -1736,8 +1736,8 @@ A short overview over each input and what it does:
|
|||
nixpkgs-stable25_11.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
|
||||
home-manager = {
|
||||
# url = "github:nix-community/home-manager";
|
||||
url = "github:Swarsel/home-manager/main";
|
||||
url = "github:nix-community/home-manager";
|
||||
# url = "github:Swarsel/home-manager/main";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-index-database = {
|
||||
|
|
@ -2662,7 +2662,8 @@ Another note concerning [[https://flake.parts/][flake-parts]]:
|
|||
|
||||
ender3 = mkDevice "Ender 3" {
|
||||
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 = { };
|
||||
services = {
|
||||
octoprint = {
|
||||
|
|
@ -2703,11 +2704,11 @@ Another note concerning [[https://flake.parts/][flake-parts]]:
|
|||
services = {
|
||||
ollama = {
|
||||
name = "Ollama";
|
||||
icon = "${self}/files/topology-images/ollama.png";
|
||||
icon = "services.ollama";
|
||||
};
|
||||
openwebui = {
|
||||
name = "Open WebUI";
|
||||
icon = "${self}/files/topology-images/openwebui.png";
|
||||
icon = "services.open-webui";
|
||||
};
|
||||
comfyui = {
|
||||
name = "Comfy UI";
|
||||
|
|
@ -6207,7 +6208,7 @@ This machine mainly acts as my proxy server to stand before my local machines.
|
|||
};
|
||||
restic.targets = {
|
||||
SwarselMoonside = {
|
||||
repository = config.repo.secrets.local.resticRepoState;
|
||||
repository = config.repo.secrets.local.resticRepo;
|
||||
paths = [
|
||||
"/persist/opt/minecraft"
|
||||
];
|
||||
|
|
@ -11347,22 +11348,7 @@ This is a collection of packages that are useful for server-type hosts that do n
|
|||
services = {
|
||||
# add a user with sudo smbpasswd -a <user>
|
||||
samba = {
|
||||
# package = pkgs.samba4Full;
|
||||
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;
|
||||
openFirewall = true;
|
||||
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; };
|
||||
|
||||
# networking.firewall.allowedTCPPorts = [ servicePort ];
|
||||
topology.self.services.${serviceName} = {
|
||||
name = "Kavita";
|
||||
info = "https://${serviceDomain}";
|
||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
};
|
||||
topology.self.services.${serviceName}.info = "https://${serviceDomain}";
|
||||
|
||||
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
||||
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} = {
|
||||
name = lib.toUpper serviceName;
|
||||
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 {
|
||||
|
|
@ -13160,13 +13141,14 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
|
|||
|
||||
services.${serviceName} = {
|
||||
enable = true;
|
||||
musicDirectory = "/storage/Music";
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
music_directory = "/storage/Music";
|
||||
bind_to_address = "any";
|
||||
port = servicePort;
|
||||
};
|
||||
user = serviceUser;
|
||||
group = serviceGroup;
|
||||
network = {
|
||||
port = servicePort;
|
||||
listenAddress = "any";
|
||||
};
|
||||
credentials = [
|
||||
{
|
||||
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";
|
||||
config = lib.mkIf config.swarselmodules.server.${serviceName} {
|
||||
|
||||
topology.self.services = {
|
||||
${serviceName} = {
|
||||
name = lib.swarselsystems.toCapitalized serviceName;
|
||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
${serviceName} = {
|
||||
enable = true;
|
||||
|
|
@ -13388,19 +13363,13 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
|
|||
|
||||
# networking.firewall.allowedTCPPorts = [ servicePort federationPort ];
|
||||
|
||||
topology.self.services = {
|
||||
${serviceName} = {
|
||||
name = lib.swarselsystems.toCapitalized serviceName;
|
||||
info = "https://${serviceDomain}";
|
||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
};
|
||||
} // (lib.listToAttrs (map
|
||||
topology.self.services = lib.listToAttrs (map
|
||||
(service:
|
||||
lib.nameValuePair "mautrix-${service}" {
|
||||
name = "mautrix-${service}";
|
||||
icon = "${self}/files/topology-images/mautrix.png";
|
||||
})
|
||||
[ "whatsapp" "signal" "telegram" ]));
|
||||
[ "whatsapp" "signal" "telegram" ]);
|
||||
|
||||
systemd = {
|
||||
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, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) sopsFile;
|
||||
|
||||
targets = config.swarselsystems.server.restic.targets;
|
||||
inherit (config.swarselsystems.server.restic) targets;
|
||||
in
|
||||
{
|
||||
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 {
|
||||
directories = [{ directory = "/var/lib/private/${serviceName}"; }];
|
||||
directories = [{ directory = "/var/lib/private/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
|
||||
postgresPort = config.services.postgresql.settings.port; # 5432
|
||||
containerRev = "sha256:96693e41a6eb2aae44f96033a090378270f024ddf4e6095edf8d57674f21095d";
|
||||
containerRev = "sha256:bb8ad2b6891441d8ec5c3169b684b71574f3bb3e9afb345bad2f91d833d60340";
|
||||
|
||||
inherit (config.swarselsystems) sopsFile;
|
||||
in
|
||||
|
|
@ -16834,7 +16802,7 @@ Deployment notes:
|
|||
- finally, disable new user registration in web ui
|
||||
|
||||
#+begin_src nix-ts :tangle modules/nixos/server/slink.nix
|
||||
{ self, lib, config, dns, globals, confLib, ... }:
|
||||
{ lib, config, dns, globals, confLib, ... }:
|
||||
let
|
||||
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;
|
||||
|
|
@ -16893,7 +16861,7 @@ in
|
|||
topology.self.services.${serviceName} = {
|
||||
name = lib.swarselsystems.toCapitalized serviceName;
|
||||
info = "https://${serviceDomain}";
|
||||
icon = "${self}/files/topology-images/shlink.png";
|
||||
icon = "services.not-available";
|
||||
};
|
||||
|
||||
globals = {
|
||||
|
|
@ -17081,13 +17049,6 @@ in
|
|||
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
||||
};
|
||||
|
||||
systemd.services.homebox = {
|
||||
environment = {
|
||||
TMPDIR = "/var/lib/homebox/.tmp";
|
||||
HOME = "/var/lib/homebox";
|
||||
};
|
||||
};
|
||||
|
||||
services.${serviceName} = {
|
||||
enable = true;
|
||||
package = pkgs.bisect.homebox;
|
||||
|
|
@ -19085,7 +19046,7 @@ This has some state:
|
|||
];
|
||||
dhcp.enabled = false;
|
||||
};
|
||||
filtering.rewrites = map
|
||||
filtering.rewrites = (map
|
||||
(domain: {
|
||||
inherit domain;
|
||||
# FIXME: change to homeWebProxy once that is setup
|
||||
|
|
@ -19093,7 +19054,13 @@ This has some state:
|
|||
# answer = globals.hosts.${webProxy}.wanAddress4;
|
||||
enabled = true;
|
||||
})
|
||||
homeDomains;
|
||||
homeDomains) ++ [
|
||||
{
|
||||
domain = "smb.${globals.domains.main}";
|
||||
answer = globals.networks.home-lan.vlans.services.hosts.storage.ipv4;
|
||||
enabled = true;
|
||||
}
|
||||
];
|
||||
filters = [
|
||||
{
|
||||
name = "AdGuard DNS filter";
|
||||
|
|
@ -25118,57 +25085,61 @@ When setting up a new machine:
|
|||
#+end_src
|
||||
|
||||
#+begin_src nix-ts :tangle modules/home/common/gpg-agent.nix
|
||||
{ self, lib, config, pkgs, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) mainUser homeDir;
|
||||
in
|
||||
{
|
||||
options.swarselmodules.gpgagent = lib.mkEnableOption "gpg agent settings";
|
||||
config = lib.mkIf config.swarselmodules.gpgagent {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
verbose = true;
|
||||
enableZshIntegration = true;
|
||||
enableScDaemon = true;
|
||||
enableSshSupport = true;
|
||||
enableExtraSocket = true;
|
||||
pinentry.package = pkgs.wayprompt;
|
||||
pinentry.program = "pinentry-wayprompt";
|
||||
# pinentry.package = pkgs.pinentry.gtk2;
|
||||
defaultCacheTtl = 600;
|
||||
maxCacheTtl = 7200;
|
||||
extraConfig = ''
|
||||
allow-loopback-pinentry
|
||||
allow-emacs-pinentry
|
||||
'';
|
||||
sshKeys = [
|
||||
"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";
|
||||
{ self, lib, config, pkgs, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) mainUser homeDir;
|
||||
in
|
||||
{
|
||||
options.swarselmodules.gpgagent = lib.mkEnableOption "gpg agent settings";
|
||||
config = lib.mkIf config.swarselmodules.gpgagent {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
verbose = true;
|
||||
enableZshIntegration = true;
|
||||
enableScDaemon = true;
|
||||
enableSshSupport = true;
|
||||
enableExtraSocket = true;
|
||||
pinentry.package = pkgs.wayprompt;
|
||||
pinentry.program = "pinentry-wayprompt";
|
||||
# pinentry.package = pkgs.pinentry.gtk2;
|
||||
defaultCacheTtl = 600;
|
||||
maxCacheTtl = 7200;
|
||||
extraConfig = ''
|
||||
allow-loopback-pinentry
|
||||
allow-emacs-pinentry
|
||||
'';
|
||||
sshKeys = [
|
||||
"4BE7925262289B476DBBC17B76FD3810215AE097"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
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
|
||||
|
||||
**** gammastep
|
||||
|
|
@ -37573,7 +37544,7 @@ Here lies defined the readme for GitHub and Forgejo:
|
|||
<details>
|
||||
<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
|
||||
|
|
|
|||
|
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";
|
||||
|
||||
home-manager = {
|
||||
# url = "github:nix-community/home-manager";
|
||||
url = "github:Swarsel/home-manager/main";
|
||||
url = "github:nix-community/home-manager";
|
||||
# url = "github:Swarsel/home-manager/main";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-index-database = {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ in
|
|||
};
|
||||
restic.targets = {
|
||||
SwarselMoonside = {
|
||||
repository = config.repo.secrets.local.resticRepoState;
|
||||
repository = config.repo.secrets.local.resticRepo;
|
||||
paths = [
|
||||
"/persist/opt/minecraft"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -36,16 +36,20 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
# systemd.user.tmpfiles.settings."30-gpgagent".rules = {
|
||||
# "${homeDir}/.gnupg" = {
|
||||
# d = {
|
||||
# group = "users";
|
||||
# user = mainUser;
|
||||
# mode = "0700";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ in
|
|||
];
|
||||
dhcp.enabled = false;
|
||||
};
|
||||
filtering.rewrites = map
|
||||
filtering.rewrites = (map
|
||||
(domain: {
|
||||
inherit domain;
|
||||
# FIXME: change to homeWebProxy once that is setup
|
||||
|
|
@ -67,7 +67,13 @@ in
|
|||
# answer = globals.hosts.${webProxy}.wanAddress4;
|
||||
enabled = true;
|
||||
})
|
||||
homeDomains;
|
||||
homeDomains) ++ [
|
||||
{
|
||||
domain = "smb.${globals.domains.main}";
|
||||
answer = globals.networks.home-lan.vlans.services.hosts.storage.ipv4;
|
||||
enabled = true;
|
||||
}
|
||||
];
|
||||
filters = [
|
||||
{
|
||||
name = "AdGuard DNS filter";
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ in
|
|||
};
|
||||
|
||||
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 = {
|
||||
|
|
|
|||
|
|
@ -41,13 +41,6 @@ in
|
|||
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
||||
};
|
||||
|
||||
systemd.services.homebox = {
|
||||
environment = {
|
||||
TMPDIR = "/var/lib/homebox/.tmp";
|
||||
HOME = "/var/lib/homebox";
|
||||
};
|
||||
};
|
||||
|
||||
services.${serviceName} = {
|
||||
enable = true;
|
||||
package = pkgs.bisect.homebox;
|
||||
|
|
|
|||
|
|
@ -23,11 +23,7 @@ in
|
|||
sops.secrets.kavita-token = { inherit sopsFile; owner = serviceUser; };
|
||||
|
||||
# networking.firewall.allowedTCPPorts = [ servicePort ];
|
||||
topology.self.services.${serviceName} = {
|
||||
name = "Kavita";
|
||||
info = "https://${serviceDomain}";
|
||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
};
|
||||
topology.self.services.${serviceName}.info = "https://${serviceDomain}";
|
||||
|
||||
environment.persistence."/state" = lib.mkIf config.swarselsystems.isMicroVM {
|
||||
directories = [{ directory = "/var/lib/${serviceName}"; user = serviceUser; group = serviceGroup; }];
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ let
|
|||
|
||||
postgresUser = config.systemd.services.postgresql.serviceConfig.User; # postgres
|
||||
postgresPort = config.services.postgresql.settings.port; # 5432
|
||||
containerRev = "sha256:96693e41a6eb2aae44f96033a090378270f024ddf4e6095edf8d57674f21095d";
|
||||
containerRev = "sha256:bb8ad2b6891441d8ec5c3169b684b71574f3bb3e9afb345bad2f91d833d60340";
|
||||
|
||||
inherit (config.swarselsystems) sopsFile;
|
||||
in
|
||||
|
|
|
|||
|
|
@ -63,19 +63,13 @@ in
|
|||
|
||||
# networking.firewall.allowedTCPPorts = [ servicePort federationPort ];
|
||||
|
||||
topology.self.services = {
|
||||
${serviceName} = {
|
||||
name = lib.swarselsystems.toCapitalized serviceName;
|
||||
info = "https://${serviceDomain}";
|
||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
};
|
||||
} // (lib.listToAttrs (map
|
||||
topology.self.services = lib.listToAttrs (map
|
||||
(service:
|
||||
lib.nameValuePair "mautrix-${service}" {
|
||||
name = "mautrix-${service}";
|
||||
icon = "${self}/files/topology-images/mautrix.png";
|
||||
})
|
||||
[ "whatsapp" "signal" "telegram" ]));
|
||||
[ "whatsapp" "signal" "telegram" ]);
|
||||
|
||||
systemd = {
|
||||
timers."restart-bridges" = {
|
||||
|
|
|
|||
|
|
@ -31,9 +31,8 @@ in
|
|||
];
|
||||
|
||||
topology.self.services.${serviceName} = {
|
||||
name = lib.toUpper serviceName;
|
||||
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 {
|
||||
|
|
@ -42,13 +41,14 @@ in
|
|||
|
||||
services.${serviceName} = {
|
||||
enable = true;
|
||||
musicDirectory = "/storage/Music";
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
music_directory = "/storage/Music";
|
||||
bind_to_address = "any";
|
||||
port = servicePort;
|
||||
};
|
||||
user = serviceUser;
|
||||
group = serviceGroup;
|
||||
network = {
|
||||
port = servicePort;
|
||||
listenAddress = "any";
|
||||
};
|
||||
credentials = [
|
||||
{
|
||||
passwordFile = config.sops.secrets.mpd-pw.path;
|
||||
|
|
|
|||
|
|
@ -19,22 +19,7 @@ in
|
|||
services = {
|
||||
# add a user with sudo smbpasswd -a <user>
|
||||
samba = {
|
||||
# package = pkgs.samba4Full;
|
||||
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;
|
||||
openFirewall = true;
|
||||
settings.Eternor = {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,6 @@ in
|
|||
options.swarselmodules.server.${serviceName} = lib.mkEnableOption "enable ${serviceName} on server";
|
||||
config = lib.mkIf config.swarselmodules.server.${serviceName} {
|
||||
|
||||
topology.self.services = {
|
||||
${serviceName} = {
|
||||
name = lib.swarselsystems.toCapitalized serviceName;
|
||||
icon = "${self}/files/topology-images/${serviceName}.png";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
${serviceName} = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) sopsFile;
|
||||
|
||||
targets = config.swarselsystems.server.restic.targets;
|
||||
inherit (config.swarselsystems.server.restic) targets;
|
||||
in
|
||||
{
|
||||
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
|
||||
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;
|
||||
|
|
@ -57,7 +57,7 @@ in
|
|||
topology.self.services.${serviceName} = {
|
||||
name = lib.swarselsystems.toCapitalized serviceName;
|
||||
info = "https://${serviceDomain}";
|
||||
icon = "${self}/files/topology-images/shlink.png";
|
||||
icon = "services.not-available";
|
||||
};
|
||||
|
||||
globals = {
|
||||
|
|
|
|||
|
|
@ -192,7 +192,8 @@
|
|||
|
||||
ender3 = mkDevice "Ender 3" {
|
||||
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 = { };
|
||||
services = {
|
||||
octoprint = {
|
||||
|
|
@ -233,11 +234,11 @@
|
|||
services = {
|
||||
ollama = {
|
||||
name = "Ollama";
|
||||
icon = "${self}/files/topology-images/ollama.png";
|
||||
icon = "services.ollama";
|
||||
};
|
||||
openwebui = {
|
||||
name = "Open WebUI";
|
||||
icon = "${self}/files/topology-images/openwebui.png";
|
||||
icon = "services.open-webui";
|
||||
};
|
||||
comfyui = {
|
||||
name = "Comfy UI";
|
||||
|
|
|
|||