Deploy basic config to new mirror server

This commit is contained in:
Ciapa 2023-05-11 20:23:01 +00:00
parent 7a3a236c29
commit 31c208ca9b
4 changed files with 68 additions and 0 deletions

View File

@ -30,6 +30,16 @@
];
};
"mirror.lewd.wtf" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
modules = [
sops-nix.nixosModules.sops
./default.nix
./hosts/mirror.lewd.wtf/configuration.nix
];
};
"nyx.lewd.wtf" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
@ -98,6 +108,19 @@
};
};
"mirror.lewd.wtf" = {
sshOpts = [ "-p" "222" "-o" "StrictHostKeyChecking=no" ];
hostname = "new.mirror.lewd.wtf";
fastConnection = true;
profiles.system = {
sshUser = "root";
path =
deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."mirror.lewd.wtf";
user = "root";
};
};
"nyx.lewd.wtf" = {
sshOpts = [ "-p" "222" "-o" "StrictHostKeyChecking=no" ];
hostname = "192.168.0.10";

View File

@ -0,0 +1,21 @@
{ self, config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./networking.nix
];
variables.hostName = "new";
variables.domain = "mirror.lewd.wtf";
networking.hostName = "${config.variables.hostName}";
networking.domain = "${config.variables.domain}";
boot.loader.grub = {
enable = true;
efiSupport = false;
devices = [ "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0" ];
};
system.stateVersion = "22.11";
}

View File

@ -0,0 +1,13 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.kernelModules = [ "kvm-intel" ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
services.qemuGuest.enable = true;
}

View File

@ -0,0 +1,11 @@
{ ... }:
{
networking.defaultGateway = "192.168.11.1";
networking.nameservers = [ "1.1.1.1" ];
networking.interfaces.ens18.ipv4.addresses = [
{
address = "192.168.11.107";
prefixLength = 24;
}
];
}