diff --git a/hosts/titan/configuration.nix b/hosts/titan/configuration.nix index 2642fbf..f92f149 100644 --- a/hosts/titan/configuration.nix +++ b/hosts/titan/configuration.nix @@ -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 diff --git a/hosts/titan/hardware/hardware-configuration.nix b/hosts/titan/hardware/hardware-configuration.nix index 424b663..a5042ff 100644 --- a/hosts/titan/hardware/hardware-configuration.nix +++ b/hosts/titan/hardware/hardware-configuration.nix @@ -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"; } diff --git a/hosts/titan/services/cloud.nix b/hosts/titan/services/cloud.nix index 923364d..b365204 100644 --- a/hosts/titan/services/cloud.nix +++ b/hosts/titan/services/cloud.nix @@ -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 = { diff --git a/hosts/titan/services/forge.nix b/hosts/titan/services/forge.nix index ccc5451..4f5afe7 100644 --- a/hosts/titan/services/forge.nix +++ b/hosts/titan/services/forge.nix @@ -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; }; }; diff --git a/hosts/titan/services/matrix.nix b/hosts/titan/services/matrix.nix new file mode 100644 index 0000000..d4c6b6b --- /dev/null +++ b/hosts/titan/services/matrix.nix @@ -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; + } + ]; + } + ]; + }; + }; +} diff --git a/users/ultra/home.nix b/users/ultra/home.nix index c1c8b54..bced739 100644 --- a/users/ultra/home.nix +++ b/users/ultra/home.nix @@ -186,6 +186,7 @@ in { vesktop ktailctl caddy + floorp ]; };