Compare commits
7 Commits
samba
...
0ebe8d1121
Author | SHA1 | Date | |
---|---|---|---|
0ebe8d1121 | |||
d80ae92464 | |||
883204e90e | |||
0172e6af2b | |||
66786c2455 | |||
e30a5830ef | |||
572cca2dd9 |
@@ -15,6 +15,7 @@
|
||||
common = import ./modules/common.nix;
|
||||
prompt = import ./modules/prompt.nix;
|
||||
server = import ./modules/server.nix;
|
||||
zerotier = import ./modules/zerotier.nix;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
@@ -28,6 +29,11 @@
|
||||
modules = [ ./hosts/monolith ];
|
||||
specialArgs = { inherit self inputs secrets; };
|
||||
};
|
||||
quasar = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/quasar ];
|
||||
specialArgs = { inherit self inputs secrets; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -3,8 +3,10 @@
|
||||
imports = [
|
||||
self.nixosModules.common
|
||||
self.nixosModules.prompt
|
||||
self.nixosModules.zerotier
|
||||
./backup.nix
|
||||
./dev.nix
|
||||
./printing.nix
|
||||
];
|
||||
|
||||
networking.hostName = "marauder";
|
||||
@@ -84,9 +86,8 @@
|
||||
ffmpeg
|
||||
(callPackage ./ffcheck.nix { })
|
||||
|
||||
# Misc
|
||||
# Productivity
|
||||
obsidian
|
||||
(callPackage ./romraider.nix { })
|
||||
]);
|
||||
};
|
||||
|
||||
|
16
hosts/marauder/printing.nix
Normal file
16
hosts/marauder/printing.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
system-config-printer
|
||||
];
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
{ 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"
|
||||
'';
|
||||
}
|
@@ -4,6 +4,7 @@
|
||||
self.nixosModules.common
|
||||
self.nixosModules.prompt
|
||||
self.nixosModules.server
|
||||
self.nixosModules.zerotier
|
||||
./dns.nix
|
||||
];
|
||||
|
||||
|
@@ -1,29 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
54
hosts/quasar/default.nix
Normal file
54
hosts/quasar/default.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{ 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;
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
promptEmoji = "🌟";
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
{ pkgs, secrets, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
@@ -41,11 +41,6 @@
|
||||
'';
|
||||
};
|
||||
|
||||
services.zerotierone = {
|
||||
enable = true;
|
||||
joinNetworks = secrets.zerotier.networks;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git-crypt
|
||||
jq
|
||||
|
7
modules/zerotier.nix
Normal file
7
modules/zerotier.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ secrets, ... }:
|
||||
{
|
||||
services.zerotierone = {
|
||||
enable = true;
|
||||
joinNetworks = secrets.zerotier.networks;
|
||||
};
|
||||
}
|
BIN
secrets.json
BIN
secrets.json
Binary file not shown.
Reference in New Issue
Block a user