-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5498d6e
commit 7094415
Showing
4 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/target | ||
result | ||
.direnv | ||
nixos.qcow2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# add-hoc config for a test VM. | ||
{ inputs, modulesPath, ... }: | ||
{ | ||
imports = [ | ||
"${modulesPath}/virtualisation/qemu-vm.nix" | ||
./lizard.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 = '' | ||
Trekkie-McTest: enterprise-grade, free-range, grass-fed testing vm | ||
Now with 100% less graphics! | ||
Services exposed to the host: | ||
lizard: 8060 | ||
SSH: 2222 | ||
redis: 8061 | ||
root password is "lol" | ||
have fun! | ||
''; | ||
|
||
|
||
networking.firewall.enable = false; | ||
|
||
users.mutableUsers = false; | ||
users.users.root.password = "lol"; | ||
services.openssh = { | ||
enable = true; | ||
permitRootLogin = "yes"; | ||
}; | ||
|
||
system.stateVersion = "22.11"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ config, inputs, ... }: | ||
{ | ||
TLMS.lizard = { | ||
# Unlike the production, we do not reverse-proxy the lizard, we just expose | ||
# port directly to the host vm. | ||
enable = true; | ||
http = { | ||
host = "0.0.0.0"; | ||
port = 8060; | ||
}; | ||
redis = { | ||
port = 6379; | ||
host = "localhost"; | ||
}; | ||
logLevel = "info"; | ||
}; | ||
systemd.services."lizard" = { | ||
after = [ "redis-lizard.service" ]; | ||
wants = [ "redis-lizard.service" ]; | ||
}; | ||
|
||
services = { | ||
redis.servers."lizard" = { | ||
enable = true; | ||
bind = config.TLMS.lizard.redis.host; | ||
port = config.TLMS.lizard.redis.port; | ||
}; | ||
}; | ||
} |