Skip to content

Commit

Permalink
vm hw
Browse files Browse the repository at this point in the history
  • Loading branch information
esselius committed Oct 22, 2024
1 parent 40f157f commit 659fd97
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ Deploy refreshed secrets.
```shell
$ nixos-rebuild switch --flake . --target-host 192.168.1.195 --fast --use-remote-sudo
```

VM install

```
$ nixos-install --flake github:esselius/cfg#vm
```
8 changes: 8 additions & 0 deletions nixos-configurations/vm.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
{ modulesPath, ezModules, ... }:

{
nixpkgs.hostPlatform = "aarch64-linux";

system.stateVersion = "24.05";

context = "work";
formfactor = "vm";

imports = [
"${modulesPath}/virtualisation/vmware-guest.nix"
ezModules.hardware-vm
ezModules.user-peteresselius
];
}
25 changes: 25 additions & 0 deletions nixos-modules/hardware-vm.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ config, lib, pkgs, modulesPath, ... }:

{
imports = [ ];

boot.initrd.availableKernelModules = [ "uhci_hcd" "ahci" "xhci_pci" "nvme" "usbhid" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};

fileSystems."/boot" =
{ device = "/dev/disk/by-label/boot";
fsType = "vfat";
};

swapDevices = [ ];

boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

0 comments on commit 659fd97

Please sign in to comment.