2 Commits

Author SHA1 Message Date
a274189617 WIP 2025-06-15 02:09:03 -07:00
75477b46b4 WIP RomRaider derivation 2024-09-23 20:35:51 -07:00
11 changed files with 61 additions and 102 deletions

View File

@@ -15,7 +15,6 @@
common = import ./modules/common.nix;
prompt = import ./modules/prompt.nix;
server = import ./modules/server.nix;
zerotier = import ./modules/zerotier.nix;
};
nixosConfigurations = {
@@ -29,11 +28,6 @@
modules = [ ./hosts/monolith ];
specialArgs = { inherit self inputs secrets; };
};
quasar = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./hosts/quasar ];
specialArgs = { inherit self inputs secrets; };
};
};
};
}

View File

@@ -3,10 +3,8 @@
imports = [
self.nixosModules.common
self.nixosModules.prompt
self.nixosModules.zerotier
./backup.nix
./dev.nix
./printing.nix
];
networking.hostName = "marauder";
@@ -86,8 +84,9 @@
ffmpeg
(callPackage ./ffcheck.nix { })
# Productivity
# Misc
obsidian
(callPackage ./romraider.nix { })
]);
};

View File

@@ -1,16 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
system-config-printer
];
services.printing = {
enable = true;
};
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
}

View File

@@ -0,0 +1,24 @@
{ stdenv, fetchFromGitHub, ant, jdk11, makeWrapper, jre }: stdenv.mkDerivation {
pname = "romraider";
version = "1.0.0";
src = fetchFromGitHub {
owner = "Romraider";
repo = "Romraider";
rev = "1.0.0-DEC01-2023";
hash = "sha256-KCG6D/+yupGahzPtZk1l9FK826MHZKdTuWoTCLC0ngY=";
};
JRE_DIR = jdk11;
nativeBuildInputs = [ ant jdk11 makeWrapper ];
buildPhase = "ant build-linux";
installPhase = ''
mkdir -p $out/{bin,share/java}
install build/linux/lib/RomRaider.jar $out/share/java/romraider.jar
makeWrapper ${jdk11}/bin/java $out/bin/romraider \
--add-flags "-jar $out/share/java/romraider.jar"
'';
}

View File

@@ -4,7 +4,6 @@
self.nixosModules.common
self.nixosModules.prompt
self.nixosModules.server
self.nixosModules.zerotier
./dns.nix
];

29
hosts/monolith/samba.nix Normal file
View File

@@ -0,0 +1,29 @@
{ ... }:
{
services.samba = {
enable = true;
openFirewall = true;
settings = {
global = {
workgroup = "WORKGROUP";
"server string" = "monolith";
"netbios name" = "monolith";
security = "user";
"invalid users" = [ "root" ];
"guest account" = "nobody";
"map to guest" = "bad user";
};
public = {
path = "/library/share";
browseable = "yes";
"read only" = "no";
"guest ok" = "yes";
};
};
};
services.samba-wsdd = {
enable = true;
openFirewall = true;
};
}

View File

@@ -1,68 +0,0 @@
{ self, modulesPath, pkgs, config, secrets, ... }:
{
imports = [
"${modulesPath}/virtualisation/amazon-image.nix"
self.nixosModules.common
self.nixosModules.prompt
self.nixosModules.server
];
networking = {
hostName = "quasar";
domain = "consortium.chat";
firewall.allowedTCPPorts = [ 80 443 ];
};
services.postgresql = {
enable = true;
};
services.caddy = {
enable = true;
virtualHosts = {
"${config.networking.domain}".extraConfig = ''
reverse_proxy localhost:8008
header Strict-Transport-Security "max-age=63072000; includeSubDomains;"
'';
"matrix.${config.networking.domain}".extraConfig = ''
reverse_proxy /_matrix/* localhost:8008
reverse_proxy /_synapse/client/* localhost:8008
'';
"admin.${config.networking.domain}".extraConfig = ''
root * ${pkgs.synapse-admin}
file_server
'';
};
};
services.matrix-synapse = {
enable = true;
settings = {
server_name = config.networking.domain;
serve_server_wellknown = true;
# app_service_config_files = [ ];
registration_shared_secret = secrets.synapse."consortium.chat".registration-shared-secret;
macaroon_secret_key = secrets.synapse."consortium.chat".macaroon-secret-key;
form_secret = secrets.synapse."consortium.chat".form-secret;
};
};
services.mautrix-telegram = {
enable = true;
settings = {
homeserver = {
address = "http://localhost:8008";
domain = config.networking.domain;
};
appservice = {
id = "telegram";
};
};
};
promptEmoji = "🌟";
time.timeZone = "America/Los_Angeles";
system.stateVersion = "24.05";
}

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, secrets, ... }:
{
nixpkgs.config.allowUnfree = true;
@@ -41,6 +41,11 @@
'';
};
services.zerotierone = {
enable = true;
joinNetworks = secrets.zerotier.networks;
};
environment.systemPackages = with pkgs; [
git-crypt
jq

0
modules/prompt.nix Executable file → Normal file
View File

View File

@@ -1,7 +0,0 @@
{ secrets, ... }:
{
services.zerotierone = {
enable = true;
joinNetworks = secrets.zerotier.networks;
};
}

Binary file not shown.