summaryrefslogtreecommitdiff
path: root/hosts/atlas
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/atlas')
-rw-r--r--hosts/atlas/default.nix50
-rw-r--r--hosts/atlas/hardware-configuration.nix18
2 files changed, 68 insertions, 0 deletions
diff --git a/hosts/atlas/default.nix b/hosts/atlas/default.nix
new file mode 100644
index 0000000..3d52b66
--- /dev/null
+++ b/hosts/atlas/default.nix
@@ -0,0 +1,50 @@
+{
+ config,
+ hercules-ci-agent,
+ pkgs,
+ ...
+}: {
+ imports = [
+ ./hardware-configuration.nix
+ hercules-ci-agent.nixosModules.agent-service
+ ];
+
+ server.enable = true;
+
+ boot.cleanTmpDir = true;
+
+ environment.systemPackages = with pkgs; [
+ hercules-ci-agent.packages.x86_64-linux.hercules-ci-cli
+ ];
+
+ networking.hostName = "atlas";
+ nix.settings.trusted-users = ["atlas"];
+
+ services.hercules-ci-agent.enable = true;
+
+ swapDevices = [
+ {
+ device = "/swapfile";
+ size = 16384;
+ }
+ ];
+
+ system.stateVersion = "22.11";
+
+ users.users = let
+ openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPV9wiDwXVyoVh347CAulkdGzG7+1m/rZ1aV5fk3BHM atlas [email protected]"
+ ];
+ in {
+ root = {inherit openssh;};
+ atlas = {
+ extraGroups = ["wheel"];
+ isNormalUser = true;
+ shell = pkgs.bash;
+ passwordFile = config.age.secrets.atlasPassword.path;
+ inherit openssh;
+ };
+ };
+
+ zramSwap.enable = true;
+}
diff --git a/hosts/atlas/hardware-configuration.nix b/hosts/atlas/hardware-configuration.nix
new file mode 100644
index 0000000..f3a929f
--- /dev/null
+++ b/hosts/atlas/hardware-configuration.nix
@@ -0,0 +1,18 @@
+{modulesPath, ...}: {
+ imports = [(modulesPath + "/profiles/qemu-guest.nix")];
+ boot.loader.grub = {
+ efiSupport = true;
+ efiInstallAsRemovable = true;
+ device = "nodev";
+ };
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/EC6B-53AA";
+ fsType = "vfat";
+ };
+ boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
+ boot.initrd.kernelModules = ["nvme"];
+ fileSystems."/" = {
+ device = "/dev/sda1";
+ fsType = "ext4";
+ };
+}