remove dead code

This commit is contained in:
Oxapentane - 2023-05-30 10:04:49 +02:00
parent 020e0d3804
commit c13446c3bb
Signed by: oxapentane
GPG Key ID: 91FA5E5BF9AA901C
3 changed files with 0 additions and 98 deletions

View File

@ -1,54 +0,0 @@
{ self, lib, modulesPath, ... }:
{
imports = [
"${modulesPath}/virtualisation/qemu-vm.nix"
#./postgres.nix
./nginx.nix
];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
};
boot = {
kernelParams = [ "console=ttyS0" "boot.shell_on_fail" ];
loader.timeout = 5;
};
virtualisation = {
diskSize = 512;
memorySize = 512;
graphics = false;
};
services.getty = {
autologinUser = "root";
};
users.motd = ''
McTest: enterprise-grade, free-range, grass-fed testing vm
Now with 100% less graphics!
Services exposed to the host:
datacare: 8070
SSH: 2223
postgres: 8889
redis: 8062
root password is "lol"
have fun!
'';
sops.defaultSopsFile = (lib.mkForce (self + /secrets/mctest/secrets.yaml));
networking.firewall.enable = false;
users.mutableUsers = false;
users.users.root.password = "lol";
services.openssh = {
enable = true;
PermitRootLogin = lib.mkForce "yes";
};
}

View File

@ -1,3 +0,0 @@
{ lib, ... }: {
deployment-TLMS.domain = lib.mkForce "local.tlm.solutions";
}

View File

@ -1,41 +0,0 @@
{ inputs, ... }: {
services.postgresql = {
enable = true;
port = 5432;
package = pkgs.postgresql_14;
ensureDatabases = [ "tlms" ];
ensureUsers = [
{
name = "tlms";
ensurePermissions = {
"DATABASE tlms" = "ALL PRIVILEGES";
"ALL TABLES IN SCHEMA public" = "ALL";
};
}
];
};
environment.systemPackages = [ inputs.tlms-rs.packages.x86_64-linux.run-migration-based ];
systemd.services.postgresql = {
unitConfig = {
TimeoutStartSec = 3000;
};
serviceConfig = {
TimeoutSec = lib.mkForce 3000;
};
postStart = lib.mkAfter ''
$PSQL -c "ALTER ROLE tlms WITH PASSWORD '$(cat ${inputs.self}/tests/vm/test-pw)';"
export DATABASE_URL=postgres:///tlms
${inputs.tlms-rs.packages.x86_64-linux.run-migration-based}/bin/run-migration
# fix the permissions for tlms user on migration-created tables
$PSQL -c "GRANT ALL ON DATABASE tlms TO tlms;"
$PSQL -d tlms -c "GRANT ALL ON ALL TABLES IN SCHEMA public TO tlms;"
$PSQL -d tlms -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO tlms;"
unset DATABASE_URL
'';
};
}