diff --git a/hosts/default.nix b/hosts/default.nix index 357302f..b80d9a5 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -29,4 +29,8 @@ in hardware.framework-16-7040-amd ]; }; + vm = { + system = "x86_64-linux"; + targetHost = "192.168.122.110"; + }; } diff --git a/hosts/vm/configuration.nix b/hosts/vm/configuration.nix new file mode 100644 index 0000000..a2ba66e --- /dev/null +++ b/hosts/vm/configuration.nix @@ -0,0 +1,58 @@ +{ pkgs, ... }: + +let + sshKeys = { + jalr = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH3l+Yixrsjhze20CSjvUK4Qj/BNqbTNitgk20vuzPej cardno:25_750_479" ]; + }; +in +{ + environment.systemPackages = with pkgs; [ + htop + ]; + + boot = { + loader.grub.enable = false; + initrd = { + enable = true; + systemd.enable = true; + }; + }; + + services.getty.autologinUser = "root"; + + fileSystems."/" = { + fsType = "tmpfs"; + options = [ "mode=0755" ]; + }; + + services.openssh.enable = true; + users.users = { + jalr = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + openssh.authorizedKeys.keys = sshKeys.jalr; + }; + root.openssh.authorizedKeys.keys = sshKeys.jalr; + }; + security.sudo.wheelNeedsPassword = false; + + + services.xserver = { + enable = true; + desktopManager.gnome.enable = true; + displayManager = { + autoLogin = { + enable = true; + user = "jalr"; + }; + gdm = { + autoSuspend = false; + enable = true; + wayland = true; + }; + }; + exportConfiguration = true; + }; + + system.stateVersion = "25.05"; +}