mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-01-19 01:21:39 +01:00
configure trucksimulatorbot
This commit is contained in:
parent
747b917732
commit
1c023fa7af
6 changed files with 71 additions and 33 deletions
54
flake.lock
54
flake.lock
|
@ -75,11 +75,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685202362,
|
"lastModified": 1685346756,
|
||||||
"narHash": "sha256-RSfrkXSFWdMosdmIy5bDAOwqTkakLscYro6oYIHidBY=",
|
"narHash": "sha256-pZNHeNkBBgi5o2DOT1T8MPHnrpJN+eEfYeqdg2ASjZA=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "078ba6daa8e2e2d8e25a226d65a418b8a85956b3",
|
"rev": "b3a86952cf14b6f556159eb898eaa7b6ceac4335",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -109,6 +109,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"images": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"trucksimulatorbot",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685252271,
|
||||||
|
"narHash": "sha256-Yytfm4nZFTeF80PP/WVbuDKQp4mvC5qXsUkcZlMbRFo=",
|
||||||
|
"owner": "therealr5",
|
||||||
|
"repo": "TruckSimulatorBot-images",
|
||||||
|
"rev": "3f827365df8f17f549d60e616a945969d059e0d0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "therealr5",
|
||||||
|
"repo": "TruckSimulatorBot-images",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"impermanence": {
|
"impermanence": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684264534,
|
"lastModified": 1684264534,
|
||||||
|
@ -241,11 +262,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685168767,
|
"lastModified": 1685290091,
|
||||||
"narHash": "sha256-wQgnxz0PdqbyKKpsWl/RU8T8QhJQcHfeC6lh1xRUTfk=",
|
"narHash": "sha256-GGQYNZ7POoqPTtXgPOLUuSiHkOKFRWYpCoWUOSeSRoU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e10802309bf9ae351eb27002c85cfdeb1be3b262",
|
"rev": "4e37b4e55b60fb7d43d2b62deb51032a489bcbe8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -261,11 +282,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685267951,
|
"lastModified": 1685304640,
|
||||||
"narHash": "sha256-Mf0tAJQYLTbjreDayneXEf//f34hAbySAPwREJq6Gg0=",
|
"narHash": "sha256-diFAEedQfEybK7FLpFOoNQFfN/R44yOxQvIVPIYmLvw=",
|
||||||
"owner": "therealr5",
|
"owner": "therealr5",
|
||||||
"repo": "purge",
|
"repo": "purge",
|
||||||
"rev": "b1c672511a392c716509e284d9013175da6a9feb",
|
"rev": "49f00c56e7bcf3bc7d84392bb872bfc36d59d95c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -286,7 +307,7 @@
|
||||||
"purge": "purge",
|
"purge": "purge",
|
||||||
"simple-nixos-mailserver": "simple-nixos-mailserver",
|
"simple-nixos-mailserver": "simple-nixos-mailserver",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"trucksimulatorbot-images": "trucksimulatorbot-images"
|
"trucksimulatorbot": "trucksimulatorbot"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"simple-nixos-mailserver": {
|
"simple-nixos-mailserver": {
|
||||||
|
@ -333,23 +354,24 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"trucksimulatorbot-images": {
|
"trucksimulatorbot": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"images": "images",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685252271,
|
"lastModified": 1685359790,
|
||||||
"narHash": "sha256-Yytfm4nZFTeF80PP/WVbuDKQp4mvC5qXsUkcZlMbRFo=",
|
"narHash": "sha256-qeOykz4m3XRgMUExo/PB97omCukd6hFfrvzc2QIYh6A=",
|
||||||
"owner": "therealr5",
|
"owner": "therealr5",
|
||||||
"repo": "trucksimulatorbot-images",
|
"repo": "TruckSimulatorBot",
|
||||||
"rev": "3f827365df8f17f549d60e616a945969d059e0d0",
|
"rev": "b573449efcdbbabdcff3a1c488689e4b3158bbf8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "therealr5",
|
"owner": "therealr5",
|
||||||
"repo": "trucksimulatorbot-images",
|
"repo": "TruckSimulatorBot",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
url = "github:therealr5/purge";
|
url = "github:therealr5/purge";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
trucksimulatorbot-images = {
|
trucksimulatorbot = {
|
||||||
url = "github:therealr5/trucksimulatorbot-images";
|
url = "github:therealr5/TruckSimulatorBot";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
, nix-colors
|
, nix-colors
|
||||||
, nixos-hardware
|
, nixos-hardware
|
||||||
, purge
|
, purge
|
||||||
, trucksimulatorbot-images
|
, trucksimulatorbot
|
||||||
, simple-nixos-mailserver
|
, simple-nixos-mailserver
|
||||||
, ...
|
, ...
|
||||||
}@attrs: {
|
}@attrs: {
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
nix-index-database.nixosModules.nix-index
|
nix-index-database.nixosModules.nix-index
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
purge.nixosModules.default
|
purge.nixosModules.default
|
||||||
trucksimulatorbot-images.nixosModules.default
|
trucksimulatorbot.nixosModules.default
|
||||||
simple-nixos-mailserver.nixosModules.default
|
simple-nixos-mailserver.nixosModules.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,23 +23,17 @@
|
||||||
efi.efiSysMountPoint = "/boot/efi";
|
efi.efiSysMountPoint = "/boot/efi";
|
||||||
};
|
};
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
#tmpOnTmpfs = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
console = {
|
|
||||||
keyMap = "dvorak";
|
|
||||||
};
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
htop-vim
|
htop-vim
|
||||||
helix
|
helix
|
||||||
docker-compose
|
|
||||||
lsof
|
lsof
|
||||||
];
|
];
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
@ -50,6 +44,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
||||||
|
systemd.services.qemu-guest-agent.path = [ pkgs.shadow ]; # fix root password reset
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|
|
@ -6,6 +6,10 @@ in
|
||||||
sops.secrets."purge/environment".owner = "purge";
|
sops.secrets."purge/environment".owner = "purge";
|
||||||
services.purge = {
|
services.purge = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
discord = {
|
||||||
|
clientId = "941041925216157746";
|
||||||
|
publicKey = "d2945f6130d9b4a8dda8c8bf52db5dee127a82f89c6b8782e84aa8f45f61d402";
|
||||||
|
};
|
||||||
environmentFile = config.sops.secrets."purge/environment".path;
|
environmentFile = config.sops.secrets."purge/environment".path;
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."${domain}" = {
|
services.nginx.virtualHosts."${domain}" = {
|
||||||
|
|
|
@ -1,10 +1,28 @@
|
||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
domain = "trucksimulatorbot.rfive.de";
|
domain = "trucksimulatorbot.rfive.de";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.trucksimulatorbot = {
|
services.trucksimulatorbot = {
|
||||||
images.enable = true;
|
enable = true;
|
||||||
|
listenPort = 9033;
|
||||||
|
discord = {
|
||||||
|
clientId = "831052837353816066";
|
||||||
|
publicKey = "faa7004a2a5096702f96f3ebeb45c7e8272c119b72c1a0894abc4d76d8cc8bad";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.mysql = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mariadb;
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "trucksimulator";
|
||||||
|
ensurePermissions = {
|
||||||
|
"trucksimulator.*" = "ALL PRIVILEGES";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ensureDatabases = [ "trucksimulator" ];
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
"images.${domain}" = {
|
"images.${domain}" = {
|
||||||
|
@ -19,9 +37,8 @@ in
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/invite".return = " 301 https://discord.com/api/oauth2/authorize?client_id=831052837353816066&permissions=262144&scope=bot%20applications.commands";
|
locations."/invite".return = " 301 https://discord.com/api/oauth2/authorize?client_id=831052837353816066&permissions=262144&scope=bot%20applications.commands";
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:9000";
|
proxyPass = "http://127.0.0.1:${toString config.services.trucksimulatorbot.listenPort}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
purge:
|
purge:
|
||||||
environment: ENC[AES256_GCM,data:+QIP6MzKi0a6PJxNuQHOYBNW6rWEcoij1KCKwManSBUxEH3ftG5mZYMtd+OIdL5FPa29qxeHPbSU18MhAcAt9KNykKwjfEa1NqFloYrCF7VDUb7TbD//1TeW8/ni4LdcgimRHEGQhlDiymgZB/5kR1wdse4+9uafoLOZJb05cyN9OFWwEOM/LQHaJq0RLcmEIx7OEs0/jXU2boNcAX1tMpfxoiIj5U0P94K6pj5odeo8SYGB0yflYM0O0hSqGkdSG4GihfvTzg2i8w==,iv:VuzQcs6eQukZJ8dCSuL/1LYr6ir18nJVKcALx0Uzcss=,tag:cBPliz+7je0AhJwffSgHVg==,type:str]
|
environment: ENC[AES256_GCM,data:4qxa4Jod8vFdd5NzHugeRlo5MtEMoUQfbCYhualyfF7RZMms7G/R4OB2RSfv5BekJechU8t8i0+2rHt/c9sVd+JU7Za20bzVqVz7wvMAiZKV,iv:1QesCJz2+tmvrNLIkAhvzMLKQy7IEP7muA7J1ijINI4=,tag:Bn3tIhMm+qOJ764XlAIm/A==,type:str]
|
||||||
mail:
|
mail:
|
||||||
rouven: ENC[AES256_GCM,data:aUUH36pDczOufIgDKWz3obcQOloKBpydZfXMUDHGrsJ3h8O0kZYFmq389L86PJ2YISTd7Jv8PfUYPdLi3e80UggKh7SdtP/bBw==,iv:XgZNmCR+XZhjMxV6H2mtepqt4YUADG+45m9P8jdLVNY=,tag:p2RNQ7uBNctJqm69kXxTug==,type:str]
|
rouven: ENC[AES256_GCM,data:aUUH36pDczOufIgDKWz3obcQOloKBpydZfXMUDHGrsJ3h8O0kZYFmq389L86PJ2YISTd7Jv8PfUYPdLi3e80UggKh7SdtP/bBw==,iv:XgZNmCR+XZhjMxV6H2mtepqt4YUADG+45m9P8jdLVNY=,tag:p2RNQ7uBNctJqm69kXxTug==,type:str]
|
||||||
rspamd: ENC[AES256_GCM,data:Q4V/0aPl9K+ba3aKAZH5Q0lnixIAQBMgPTmMfDP1ZnYAObVc,iv:NBlFpAVBw8az1qEQd+vDmzUHGPMQYuok9MXydHgx8IY=,tag:QptoxnuA+1XB4/0Zd9Yr3Q==,type:str]
|
rspamd: ENC[AES256_GCM,data:Q4V/0aPl9K+ba3aKAZH5Q0lnixIAQBMgPTmMfDP1ZnYAObVc,iv:NBlFpAVBw8az1qEQd+vDmzUHGPMQYuok9MXydHgx8IY=,tag:QptoxnuA+1XB4/0Zd9Yr3Q==,type:str]
|
||||||
|
@ -18,8 +18,8 @@ sops:
|
||||||
NGlZbU8rcWJRbGE5OEFHdUNqZ2xUS2sK/r7qJHfTP0REcM2PYM95XT0onnCYXzam
|
NGlZbU8rcWJRbGE5OEFHdUNqZ2xUS2sK/r7qJHfTP0REcM2PYM95XT0onnCYXzam
|
||||||
20BgfynX3PJE2QVcgl8rr7ssuKxESi+tY/1VB0l8Tryxe6hr/p5IVg==
|
20BgfynX3PJE2QVcgl8rr7ssuKxESi+tY/1VB0l8Tryxe6hr/p5IVg==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2023-05-24T14:54:23Z"
|
lastmodified: "2023-05-28T20:06:48Z"
|
||||||
mac: ENC[AES256_GCM,data:33ci4VTHMb9+So3BuITqB5CscTV/X+Ln18uE/NJX9w20FpxxcEVAUumtnXCdKwL2RKyN5217qyfe46eIg7eMV7tvTmg2uTjMqnjeqOrAqp++uUHCFgRccL8X6d7OVFJHDX4tXJBgmb4y6VZkoLyuYNswJut6JsI2jkhvYuTVtsM=,iv:ExpRJJMHK7dsq+ZG9kilQDDJpFtY2OTuk4fG5tLCPT4=,tag:Y6hNdvjNs5WxtH480jdZpw==,type:str]
|
mac: ENC[AES256_GCM,data:hZk9ltfNRKuTm+ePBpU5wKRexlmRd9oEuHRAjZ4kHRbJBEBTeALOcYXgNXu9ws70hZR7do869tdjY+k1Li+cquqgBFTMIs0R+hBmD9q1Tpv0bMEuQ1t3dHEiMvkm/oi19QKpZLDw9SWlwD1mw3J/4a+w/t1dR5PSrt9SWGkV6mU=,iv:DKjVYYyF5to9Bd84fT1Wl58dLs7Il160o210k/tEQaM=,tag:SgGkU0cDr61kYnmgGGkxGw==,type:str]
|
||||||
pgp:
|
pgp:
|
||||||
- created_at: "2023-04-12T15:47:07Z"
|
- created_at: "2023-04-12T15:47:07Z"
|
||||||
enc: |-
|
enc: |-
|
||||||
|
|
Loading…
Reference in a new issue