diff --git a/machines/configuration.nix b/machines/configuration.nix index 9aa4633..c4ab664 100644 --- a/machines/configuration.nix +++ b/machines/configuration.nix @@ -150,4 +150,11 @@ in ./lucia/hardware_configuration.nix ]; }; + + testvm = nixosSystem { + system = "x86_64-linux"; + specialArgs.inputs = inputs; + specialArgs.self = self; + modules = defaultModules ++ [ ./testvm ]; + }; } diff --git a/machines/testvm/default.nix b/machines/testvm/default.nix new file mode 100644 index 0000000..c342250 --- /dev/null +++ b/machines/testvm/default.nix @@ -0,0 +1,56 @@ +{ config, pkgs, inputs, ... }: +let + sshKeys = import ../ssh_keys.nix; +in +{ + imports = + [ # Include the results of the hardware scan. + #./hardware-configuration.nix + ../modules/malobeo_user.nix + ../modules/sshd.nix + ../modules/minimal_tools.nix + inputs.self.nixosModules.malobeo.initssh + inputs.self.nixosModules.malobeo.disko + ]; + + + malobeo.initssh = { + enable = true; + authorizedKeys = sshKeys.admins; + ethernetDrivers = ["virtio_net"]; + }; + + malobeo.disks = { + enable = true; + hostId = "83abc8cb"; + devNodes = "/dev/disk/by-path/"; + root = { + disk0 = "disk/by-path/pci-0000:04:00.0"; + swap = "1G"; + reservation = "1G"; + mirror = false; + }; + storage = { + enable = true; + disks = ["disk/by-path/pci-0000:08:00.0" "disk/by-path/pci-0000:09:00.0"]; + reservation = "1G"; + mirror = true; + }; + }; + + boot.initrd.kernelModules = ["virtio_blk" "zfs" "virtio_console" "virtio_pci" "virtio" "virtio_net"]; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # needed for printing drivers + nixpkgs.config.allowUnfree = true; + + services.acpid.enable = true; + + networking.hostName = "fanny"; + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Berlin"; + system.stateVersion = "23.05"; # Do.. Not.. Change.. +} +