diff --git a/flake.nix b/flake.nix index a89991d..25afb35 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; diff --git a/hosts/mirror.lewd.wtf/configuration.nix b/hosts/mirror.lewd.wtf/configuration.nix new file mode 100644 index 0000000..5774e41 --- /dev/null +++ b/hosts/mirror.lewd.wtf/configuration.nix @@ -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"; +} diff --git a/hosts/mirror.lewd.wtf/hardware-configuration.nix b/hosts/mirror.lewd.wtf/hardware-configuration.nix new file mode 100644 index 0000000..587579e --- /dev/null +++ b/hosts/mirror.lewd.wtf/hardware-configuration.nix @@ -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; +} diff --git a/hosts/mirror.lewd.wtf/networking.nix b/hosts/mirror.lewd.wtf/networking.nix new file mode 100644 index 0000000..c430f87 --- /dev/null +++ b/hosts/mirror.lewd.wtf/networking.nix @@ -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; + } + ]; +}