diff options
| author | Mike Vink <mike@pionative.com> | 2024-06-19 00:03:54 +0200 |
|---|---|---|
| committer | Mike Vink <mike@pionative.com> | 2024-06-19 00:04:23 +0200 |
| commit | 8f7474d4f0c274e1a2c0d748b7dd9e22b4fb39d7 (patch) | |
| tree | da61edea623d4bc40910d9a9d878d7b0e01087d6 /machines | |
| parent | 30321da3d82f71850f14296aaa5dd50b5816aa07 (diff) | |
should probably split xserver stuff
Diffstat (limited to 'machines')
| -rw-r--r-- | machines/vm-aarch64.nix | 74 | ||||
| -rw-r--r-- | machines/work.nix | 1 |
2 files changed, 75 insertions, 0 deletions
diff --git a/machines/vm-aarch64.nix b/machines/vm-aarch64.nix new file mode 100644 index 0000000..ced1b86 --- /dev/null +++ b/machines/vm-aarch64.nix @@ -0,0 +1,74 @@ +# https://github.com/mitchellh/nixos-config/blob/main/machines/vm-aarch64-prl.nix +{ config, pkgs, lib, ... }: { + system.stateVersion = "24.05"; + services.openssh.enable = true; + services.openssh.settings.PasswordAuthentication = true; + services.openssh.settings.PermitRootLogin = "yes"; + + # Setup qemu so we can run x86_64 binaries + boot.binfmt.emulatedSystems = ["x86_64-linux"]; + + # Disable the default module and import our override. We have + # customizations to make this work on aarch64. + disabledModules = [ "virtualisation/vmware-guest.nix" ]; + + # Interface is this on M1 + networking.interfaces.ens160.useDHCP = true; + + # Lots of stuff that uses aarch64 that claims doesn't work, but actually works. + nixpkgs.config.allowUnfree = true; + nixpkgs.config.allowUnsupportedSystem = true; + + # This works through our custom module imported above + # virtualisation.vmware.guest.enable = true; + + # Share our host filesystem + # fileSystems."/host" = { + # fsType = "fuse./run/current-system/sw/bin/vmhgfs-fuse"; + # device = ".host:/"; + # options = [ + # "umask=22" + # "uid=1000" + # "gid=1000" + # "allow_other" + # "auto_unmount" + # "defaults" + # ]; + # }; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # VMware, Parallels both only support this being 0 otherwise you see + # "error switching console mode" on boot. + boot.loader.systemd-boot.consoleMode = "0"; + + # Hardware + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "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"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens160.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} diff --git a/machines/work.nix b/machines/work.nix index 4ee0814..e7aa250 100644 --- a/machines/work.nix +++ b/machines/work.nix @@ -46,6 +46,7 @@ pkgs.act pkgs.yubikey-manager pkgs.gomplate + pkgs.just ]; hm = { home = { |
