server: do stuff
This commit is contained in:
@@ -29,6 +29,10 @@
|
|||||||
# Extras
|
# Extras
|
||||||
tangled.url = "git+https://tangled.sh/@tangled.sh/core";
|
tangled.url = "git+https://tangled.sh/@tangled.sh/core";
|
||||||
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||||
|
spacebar = {
|
||||||
|
url = "github:spacebarchat/server";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Required by NixOS:
|
# Required by NixOS:
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,6 +11,8 @@
|
|||||||
./modules/cloudflare.nix
|
./modules/cloudflare.nix
|
||||||
./modules/tangled.nix
|
./modules/tangled.nix
|
||||||
../../modules/force.nix
|
../../modules/force.nix
|
||||||
|
./modules/gitea.nix
|
||||||
|
./modules/spacebar.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# gcc. shit breaks. wtf
|
# gcc. shit breaks. wtf
|
||||||
@@ -53,7 +60,10 @@
|
|||||||
users.users.ocbwoy3 = {
|
users.users.ocbwoy3 = {
|
||||||
initialPassword = "thisisapassword42069!"; # not the type passwords i use
|
initialPassword = "thisisapassword42069!"; # not the type passwords i use
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -69,14 +79,29 @@
|
|||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ 22 443 3000 3001 8080 25565 ];
|
allowedTCPPorts = [
|
||||||
allowedUDPPorts = [ 22 443 3000 3001 8080 25565 ];
|
22
|
||||||
|
443
|
||||||
|
3000
|
||||||
|
3001
|
||||||
|
8080
|
||||||
|
25565
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
22
|
||||||
|
443
|
||||||
|
3000
|
||||||
|
3001
|
||||||
|
8080
|
||||||
|
25565
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
catppuccin = {
|
catppuccin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
flavor = "mocha";
|
flavor = "mocha";
|
||||||
accent = "blue";
|
accent = "blue";
|
||||||
|
gitea.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.05"; # DO NOT TOUCH
|
system.stateVersion = "23.05"; # DO NOT TOUCH
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, inputs, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, inputs, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
34
hosts/server/modules/gitea.nix
Normal file
34
hosts/server/modules/gitea.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.gitea = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
database = {
|
||||||
|
type = "postgres";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.ocbwoy3.dev";
|
||||||
|
ROOT_URL = "https://git.ocbwoy3.dev/";
|
||||||
|
HTTP_PORT = 2222;
|
||||||
|
DISABLE_SSH = true;
|
||||||
|
MAX_UPLOAD_FILE_SIZE = 5242880;
|
||||||
|
};
|
||||||
|
|
||||||
|
attachment = {
|
||||||
|
MAX_SIZE = 5; # MB (this is the one causing the 1024 KiB error)
|
||||||
|
};
|
||||||
|
|
||||||
|
service = {
|
||||||
|
DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
hosts/server/modules/spacebar.nix
Normal file
17
hosts/server/modules/spacebar.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ inputs.spacebar.nixosModules.default ];
|
||||||
|
|
||||||
|
services.spacebarchat-server = {
|
||||||
|
enable = true;
|
||||||
|
package = inputs.spacebar.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
|
extraEnvironment.PORT = 4067;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +1,12 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.tangled-knot = {
|
services.tangled.knot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
server = {
|
server = {
|
||||||
listenAddr = "0.0.0.0:3003";
|
listenAddr = "0.0.0.0:3003";
|
||||||
@@ -10,7 +15,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.tangled-spindle = {
|
services.tangled.spindle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
server = {
|
server = {
|
||||||
listenAddr = "0.0.0.0:3004";
|
listenAddr = "0.0.0.0:3004";
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -33,13 +38,14 @@
|
|||||||
# obs moment
|
# obs moment
|
||||||
# nixpkgs.config.cudaSupport = true;
|
# nixpkgs.config.cudaSupport = true;
|
||||||
|
|
||||||
hardware.graphics = { # hardware.graphics since NixOS 24.11
|
hardware.graphics = {
|
||||||
|
# hardware.graphics since NixOS 24.11
|
||||||
enable = true;
|
enable = true;
|
||||||
# driSupport = true;
|
# driSupport = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
nvidia-vaapi-driver
|
nvidia-vaapi-driver
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
vaapiVdpau
|
libva-vdpau-driver
|
||||||
libvdpau
|
libvdpau
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -53,10 +59,16 @@
|
|||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelModules = [ "nvidia-uvm" "nvidia-drm" ];
|
boot.kernelModules = [
|
||||||
|
"nvidia-uvm"
|
||||||
|
"nvidia-drm"
|
||||||
|
];
|
||||||
boot.blacklistedKernelModules = [ "nouveau" ];
|
boot.blacklistedKernelModules = [ "nouveau" ];
|
||||||
|
|
||||||
boot.kernelParams = [ "nvidia-drm.modeset=1" "nvidia-drm.fbdev=1" ];
|
boot.kernelParams = [
|
||||||
|
"nvidia-drm.modeset=1"
|
||||||
|
"nvidia-drm.fbdev=1"
|
||||||
|
];
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user