-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
4 changed files
with
59 additions
and
0 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ matrix.json | |
result | ||
result-* | ||
.direnv | ||
*.raw | ||
*.iso | ||
*.tar | ||
*.tar.gz | ||
|
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,5 @@ | ||
# `thatcher` | ||
|
||
This is a VPS with glauca.digital. | ||
|
||
Since it is a networking device, and networking devices are named after demons, and it is in Britain, it is therefore named after the well-known British demon, Margaret Thatcher. |
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,52 @@ | ||
inputs: | ||
{ config, pkgs, lib, modulesPath, ... }: | ||
let | ||
rootGPUID = "fce194cc-1e7e-40e6-9164-41f7ffdaddad"; | ||
rootFSUID = "5a713012-c18f-4b4f-b900-137c5739c854"; | ||
in with lib; { | ||
imports = [ inputs.self.nixosModules.server ]; | ||
|
||
astral = { | ||
tailscale.enable = mkForce false; | ||
monitoring-node.scrapeTransport = "https"; | ||
}; | ||
|
||
networking = { | ||
hostName = "thatcher"; | ||
domain = "h.astrid.tech"; | ||
}; | ||
|
||
fileSystems."/" = mkForce { | ||
device = "/dev/disk/by-uuid/${rootFSUID}"; | ||
fsType = "xfs"; | ||
autoResize = true; | ||
}; | ||
|
||
boot = { | ||
growPartition = true; | ||
kernelParams = [ "console=tty0" ]; | ||
loader.grub.device = lib.mkDefault "/dev/vda"; | ||
loader.timeout = lib.mkDefault 0; | ||
initrd.availableKernelModules = [ "uas" ]; | ||
}; | ||
|
||
system.build.raw = mkForce | ||
(import "${toString modulesPath}/../lib/make-disk-image.nix" { | ||
inherit lib config pkgs rootFSUID rootGPUID; | ||
diskSize = "auto"; | ||
format = "raw"; | ||
}); | ||
|
||
system.build.test-simple-vm = pkgs.writeShellScriptBin "test-simple-vm" '' | ||
cat ${config.system.build.raw} > test.raw | ||
truncate -s 4G test.raw | ||
${pkgs.qemu}/bin/qemu-kvm \ | ||
-smp 2 \ | ||
-m 2G \ | ||
-drive if=virtio,format=raw,file=test.raw \ | ||
-netdev user,id=mynet0,net=192.168.76.0/24,dhcpstart=192.168.76.9,hostfwd=tcp::2222-:22 \ | ||
-net nic,model=e1000,macaddr=00:20:91:84:25:7f,netdev=mynet0 | ||
''; | ||
|
||
time.timeZone = "US/Pacific"; | ||
} |
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 @@ | ||
{ arch = "x86_64-linux"; } |