From 357fbda2bb2400a52f8dec61b66342b92fa945ae Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 17 Nov 2024 11:16:44 -0800 Subject: move machine configurations under darwin and nixos Don't manage fonts on Darwin with homebrew. --- nix/hosts/nixos/vm/default.nix | 19 +++++++++++++++++++ nix/hosts/nixos/vm/hardware.nix | 14 ++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 nix/hosts/nixos/vm/default.nix create mode 100644 nix/hosts/nixos/vm/hardware.nix (limited to 'nix/hosts/nixos/vm') diff --git a/nix/hosts/nixos/vm/default.nix b/nix/hosts/nixos/vm/default.nix new file mode 100644 index 0000000..f4a51aa --- /dev/null +++ b/nix/hosts/nixos/vm/default.nix @@ -0,0 +1,19 @@ +{ ... }: { + imports = [ ./hardware.nix ]; + + boot.tmp.cleanOnBoot = true; + zramSwap.enable = false; + + networking = { + hostName = "nixos"; + domain = ""; + }; + + services.openssh.enable = true; + + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBkozy+X96u5ciX766bJ/AyQ3xm1tXZTIr5+4PVFZFi" + ]; + + system.stateVersion = "23.11"; +} diff --git a/nix/hosts/nixos/vm/hardware.nix b/nix/hosts/nixos/vm/hardware.nix new file mode 100644 index 0000000..89c3d8b --- /dev/null +++ b/nix/hosts/nixos/vm/hardware.nix @@ -0,0 +1,14 @@ +{ modulesPath, ... }: +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + boot.loader.grub = { + efiSupport = true; + efiInstallAsRemovable = true; + device = "nodev"; + }; + fileSystems."/boot" = { device = "/dev/disk/by-uuid/E783-E9AE"; fsType = "vfat"; }; + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ]; + boot.initrd.kernelModules = [ "nvme" ]; + fileSystems."/" = { device = "/dev/vda2"; fsType = "ext4"; }; + swapDevices = [{ device = "/dev/vda3"; }]; +} -- cgit v1.2.3