some schtuff

Signed-off-by: Alex Stan <alex.stan.2010@proton.me>
This commit is contained in:
Alex Stan 2024-01-20 23:07:14 +02:00
parent 4c7c8fbf1f
commit 0b60064e08
6 changed files with 62 additions and 11 deletions

View file

@ -16,6 +16,7 @@ in {
( import ./services/forge.nix inputs )
( import ./services/cloud.nix inputs )
( import ./services/vaultwarden.nix inputs )
( import ./services/matrix.nix inputs )
# ( import ./services/caddy.nix inputs ) # doesn't work
# ( import ./services/dnsmasq.nix inputs ) # borks my DNS
# ( import ./services/mail-server.nix inputs ) # needs a lot of DNS configs from cloudflaer, I only have 3 rules
@ -62,17 +63,18 @@ in {
networking = {
hostName = "titan"; # Define your hostname.
domain = "gra.phite.ro";
# Enable networking
networkmanager.enable = true;
hosts = {
"192.168.0.221" = [ "pi" "pi-master" ];
};
# hosts = {
# "192.168.0.221" = [ "pi" "pi-master" ];
# };
nameservers = [
"192.168.1.221"
];
# nameservers = [
# "192.168.1.221"
# ];
};
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -129,6 +131,7 @@ in {
"wheel"
"vboxusers"
"input"
"uinput"
];
shell = pkgs.fish;
hashedPassword = "$6$OBjnSQhhJgHsr5LE$jFtUz.2qv0l2viv86exXmfHWC0fDFXKD3rqH41NmqgkdoBrwY2rPkDBCPjdq7PSoeudYcQ0nXxJvh1N7EIUs90";
@ -332,6 +335,10 @@ in {
tailscale = {
enable = true;
};
avahi = {
enable = true;
nssmdns = true;
};
};
# create a oneshot job to authenticate to Tailscale

View file

@ -23,10 +23,11 @@
fsType = "vfat";
};
swapDevices = [ /* {
device = "/var/lib/swapfile";
size = 64 * 1024;
} */
swapDevices = [
{
device = "/var/lib/swapfile";
size = 64 * 1024;
}
{
device = "/dev/sda2";
}

View file

@ -8,9 +8,10 @@ inputs: { pkgs, config, ... }: {
extraTrustedDomains = [
"cloud.gra.phite.ro"
];
overwriteProtocol = "https";
};
extraApps = with config.services.nextcloud.package.packages.apps; {
inherit news files_markdown files_texteditor forms maps memories music onlyoffice polls;
inherit news files_markdown files_texteditor forms maps memories music onlyoffice polls calendar tasks;
};
/*
extraOptions = {

View file

@ -17,6 +17,11 @@ inputs: { config, pkgs, ... }: {
appName = "Graphite's Forge";
domain = "git.gra.phite.ro";
rootUrl = "https://git.gra.phite.ro";
settings = {
server = {
HTTP_PORT = 3004;
};
};
lfs.enable = true;
};
};

View file

@ -0,0 +1,36 @@
inputs: { pkgs, ... }: {
services.postgresql.enable = true;
services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" ''
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
TEMPLATE template0
LC_COLLATE = "C"
LC_CTYPE = "C";
'';
services.matrix-synapse = {
enable = true;
settings = {
registration_shared_secret_path = "/var/synapse/.synapseregsec";
server_name = "gra.phite.ro";
public_baseurl = "https://matrix.gra.phite.ro";
listeners = [
{
port = 3003;
bind_addresses = [ "127.0.0.1" ];
# Caddy handles HTTPS and TLS
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [ "client" "federation" ];
compress = true;
}
];
}
];
};
};
}

View file

@ -186,6 +186,7 @@ in {
vesktop
ktailctl
caddy
floorp
];
};