Compare commits
15 commits
de504c7792
...
94e279094a
Author | SHA1 | Date | |
---|---|---|---|
Fiona Grzebien | 94e279094a | ||
Fiona Grzebien | c6913d2be5 | ||
Fiona Grzebien | 35b9a0ceda | ||
Fiona Grzebien | 42b11fc05e | ||
Fiona Grzebien | 88cdbcf49e | ||
Fiona Grzebien | a778d5ff64 | ||
Fiona Grzebien | ab301ab8e6 | ||
Fiona Grzebien | 154c98a25f | ||
Fiona Grzebien | 9a5345276b | ||
Fiona Grzebien | 137e263c9b | ||
Fiona Grzebien | 9c7e396a09 | ||
Fiona Grzebien | 9bd9ca6584 | ||
Fiona Grzebien | c2c21ecf45 | ||
Fiona Grzebien | fd6bf13e45 | ||
Fiona Grzebien | b380a09560 |
26
config/hosts/gameserver-node-1/configuration.nix
Normal file
26
config/hosts/gameserver-node-1/configuration.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ pterodactyl, ... }:
|
||||||
|
{
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
device = "/dev/vda";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "gameserver-node-1";
|
||||||
|
};
|
||||||
|
|
||||||
|
#environment.systemPackages = [
|
||||||
|
# pterodactyl.packages."x86_64-linux".pterodactyl-wings
|
||||||
|
#];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
pterodactyl.nixosModules.pterodactyl-wings
|
||||||
|
];
|
||||||
|
|
||||||
|
services.wings = {
|
||||||
|
enable = false;
|
||||||
|
configuration = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
}
|
6
config/hosts/gameserver-node-1/default.nix
Normal file
6
config/hosts/gameserver-node-1/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./mas.nix
|
||||||
./postgresql.nix
|
./postgresql.nix
|
||||||
./matrix-synapse.nix
|
./matrix-synapse.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
|
|
6
config/hosts/matrix/mas.nix
Normal file
6
config/hosts/matrix/mas.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
matrix-authentication-service
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -55,12 +55,4 @@
|
||||||
"/secrets/matrix-keycloak-client-secret.secret"
|
"/secrets/matrix-keycloak-client-secret.secret"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.matrix-sliding-sync = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
SYNCV3_SERVER = config.services.matrix-synapse.settings.public_baseurl;
|
|
||||||
};
|
|
||||||
environmentFile = "/secrets/matrix-SYNCV3_SECRET.secret";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
TEMPLATE template0
|
TEMPLATE template0
|
||||||
LC_COLLATE = "C"
|
LC_COLLATE = "C"
|
||||||
LC_CTYPE = "C";
|
LC_CTYPE = "C";
|
||||||
|
CREATE ROLE "mas_user" WITH LOGIN PASSWORD 'mas';
|
||||||
|
CREATE DATABASE "mas" WITH OWNER "mas_user"
|
||||||
|
TEMPLATE template0
|
||||||
|
LC_COLLATE = "C"
|
||||||
|
LC_CTYPE = "C";
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,6 @@
|
||||||
permissions = "0640";
|
permissions = "0640";
|
||||||
uploadAt = "pre-activation";
|
uploadAt = "pre-activation";
|
||||||
};
|
};
|
||||||
"matrix-SYNCV3_SECRET.secret" = {
|
|
||||||
keyCommand = keyCommandEnv ++ [ "pass" "matrix/SYNCV3_SECRET" ];
|
|
||||||
destDir = "/secrets";
|
|
||||||
user = "matrix-synapse";
|
|
||||||
group = "matrix-synapse";
|
|
||||||
permissions = "0640";
|
|
||||||
uploadAt = "pre-activation";
|
|
||||||
};
|
|
||||||
"matrix-keycloak-client-secret.secret" = {
|
"matrix-keycloak-client-secret.secret" = {
|
||||||
keyCommand = keyCommandEnv ++ [ "pass" "matrix/keycloak-client-secret" ];
|
keyCommand = keyCommandEnv ++ [ "pass" "matrix/keycloak-client-secret" ];
|
||||||
destDir = "/secrets";
|
destDir = "/secrets";
|
||||||
|
|
|
@ -13,5 +13,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,22 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
locations."/.well-known/matrix/client" = {
|
locations."/.well-known/matrix/client" = {
|
||||||
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.nekover.se\"}, \"m.identity_server\": {\"base_url\": \"https://vector.im\"}, \"org.matrix.msc3575.proxy\": {\"url\": \"https://matrix.nekover.se\"}, \"org.matrix.msc2965.authentication\": {\"issuer\": \"https://id.nekover.se/realms/nekoverse\", \"account\": \"https://id.nekover.se/realms/nekoverse/account/\"}}'";
|
return = "200 '
|
||||||
|
{
|
||||||
|
\"m.homeserver\": {
|
||||||
|
\"base_url\": \"https://matrix.nekover.se\"
|
||||||
|
},
|
||||||
|
\"m.identity_server\": {
|
||||||
|
\"base_url\": \"https://vector.im\"
|
||||||
|
},
|
||||||
|
\"org.matrix.msc3575.proxy\": {
|
||||||
|
\"url\": \"https://matrix.nekover.se\"
|
||||||
|
},
|
||||||
|
\"org.matrix.msc2965.authentication\": {
|
||||||
|
\"issuer\": \"https://nekover.se/\",
|
||||||
|
\"account\": \"https://matrix-auth.nekover.se/account\"
|
||||||
|
}
|
||||||
|
}'";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
|
55
flake.lock
55
flake.lock
|
@ -70,11 +70,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730142757,
|
"lastModified": 1730963269,
|
||||||
"narHash": "sha256-O2/v/ocUL0KsACqEIK5eD5XeX46duRIgKdOu6uCKarw=",
|
"narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dd6d18bf8d291daca03a444973bd4f9aa5c1f681",
|
"rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -101,11 +101,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730209337,
|
"lastModified": 1731015792,
|
||||||
"narHash": "sha256-WPGVR8NW9ctqwLMtYV23b94ExQulTFoTKqD21WI3fbg=",
|
"narHash": "sha256-u8U89hPPbGu627UNtd3H9/CPifDOrmsNGm2y83C9A0A=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ec7caabec9679b1a9008e0cbcfa4b14a2b600774",
|
"rev": "f7516232a6bf821825c2bd114abcaec1bcd1e54d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -117,11 +117,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730157240,
|
"lastModified": 1730989260,
|
||||||
"narHash": "sha256-P8wF4ag6Srmpb/gwskYpnIsnspbjZlRvu47iN527ABQ=",
|
"narHash": "sha256-5R9m921OhgOUNHVIxTS8+jZJokkZRsH7UOecxlchqZ8=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "75e28c029ef2605f9841e0baa335d70065fe7ae2",
|
"rev": "3aea494127aae5d08c4c501ea4ba27e6c185b822",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -132,6 +132,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729265718,
|
||||||
|
"narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717602782,
|
"lastModified": 1717602782,
|
||||||
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
|
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
|
||||||
|
@ -146,12 +162,31 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pterodactyl": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730915158,
|
||||||
|
"narHash": "sha256-qQvhHUbC5yKD6x/G0P2tvHoRf92Nd/QWB76CRnV5oyI=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "1eff87119f6e48b6b1d1afef468ee4ff1aebe333",
|
||||||
|
"revCount": 3,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.nekover.se/fi/pterodactyl.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.nekover.se/fi/pterodactyl.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-master": "nixpkgs-master",
|
"nixpkgs-master": "nixpkgs-master",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
"pterodactyl": "pterodactyl",
|
||||||
"simple-nixos-mailserver": "simple-nixos-mailserver"
|
"simple-nixos-mailserver": "simple-nixos-mailserver"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -159,7 +194,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blobs": "blobs",
|
"blobs": "blobs",
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nixpkgs-24_05": "nixpkgs-24_05",
|
"nixpkgs-24_05": "nixpkgs-24_05",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,9 +8,12 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
||||||
|
pterodactyl = {
|
||||||
|
url = "git+https://git.nekover.se/fi/pterodactyl.git";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-master, nixos-generators, simple-nixos-mailserver, ... }@inputs:
|
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-master, nixos-generators, simple-nixos-mailserver, pterodactyl, ... }@inputs:
|
||||||
let
|
let
|
||||||
hosts = import ./hosts.nix inputs;
|
hosts = import ./hosts.nix inputs;
|
||||||
helper = import ./helper.nix inputs;
|
helper = import ./helper.nix inputs;
|
||||||
|
@ -28,7 +31,7 @@
|
||||||
nodeNixpkgs = builtins.mapAttrs (name: host: host.pkgs) hosts;
|
nodeNixpkgs = builtins.mapAttrs (name: host: host.pkgs) hosts;
|
||||||
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit nixpkgs-unstable nixpkgs-master hosts simple-nixos-mailserver;
|
inherit nixpkgs-unstable nixpkgs-master hosts simple-nixos-mailserver pterodactyl;
|
||||||
|
|
||||||
# Provide environment for secret key command
|
# Provide environment for secret key command
|
||||||
keyCommandEnv = [ "env" "GNUPGHOME=/home/yuri/.passinfra_gnupg" "PASSWORD_STORE_DIR=/home/yuri/pass/infra" ];
|
keyCommandEnv = [ "env" "GNUPGHOME=/home/yuri/.passinfra_gnupg" "PASSWORD_STORE_DIR=/home/yuri/pass/infra" ];
|
||||||
|
|
13
hosts.nix
13
hosts.nix
|
@ -26,9 +26,10 @@ let
|
||||||
}) hosts;
|
}) hosts;
|
||||||
in
|
in
|
||||||
generateDefaults {
|
generateDefaults {
|
||||||
#fee = {
|
gameserver-node-1 = {
|
||||||
# site = "wg";
|
site = "vs";
|
||||||
#};
|
environment = "proxmox";
|
||||||
|
};
|
||||||
hydra = {
|
hydra = {
|
||||||
site = "vs";
|
site = "vs";
|
||||||
environment = "proxmox";
|
environment = "proxmox";
|
||||||
|
@ -70,6 +71,7 @@ in
|
||||||
environment = "proxmox";
|
environment = "proxmox";
|
||||||
};
|
};
|
||||||
matrix = {
|
matrix = {
|
||||||
|
hostNixpkgs = nixpkgs-unstable;
|
||||||
site = "vs";
|
site = "vs";
|
||||||
environment = "proxmox";
|
environment = "proxmox";
|
||||||
};
|
};
|
||||||
|
@ -94,10 +96,6 @@ in
|
||||||
site = "vs";
|
site = "vs";
|
||||||
environment = "proxmox";
|
environment = "proxmox";
|
||||||
};
|
};
|
||||||
paperless = {
|
|
||||||
site = "wg";
|
|
||||||
environment = "proxmox";
|
|
||||||
};
|
|
||||||
coturn = {
|
coturn = {
|
||||||
site = "vs";
|
site = "vs";
|
||||||
environment = "proxmox";
|
environment = "proxmox";
|
||||||
|
@ -108,6 +106,7 @@ in
|
||||||
environment = "proxmox";
|
environment = "proxmox";
|
||||||
};
|
};
|
||||||
torrent = {
|
torrent = {
|
||||||
|
hostNixpkgs = nixpkgs-unstable;
|
||||||
site = "vs";
|
site = "vs";
|
||||||
environment = "proxmox";
|
environment = "proxmox";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue