From edf807c9e0d2bdfc9e6edda92b820122a7e902f8 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Wed, 29 May 2024 14:23:03 -0700 Subject: [PATCH] adding nixosvm --- flake.nix | 9 ++++++++ hosts/nixos/hardware-configuration.nix | 30 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 hosts/nixos/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 3a2573d..d5c769e 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,15 @@ inputs.home-manager.nixosModules.default ]; }; + nixos = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + system = "x86_64-linux"; + modules = [ + ./hosts/nixos/hardware-configuration.nix + ./configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; }; }; } diff --git a/hosts/nixos/hardware-configuration.nix b/hosts/nixos/hardware-configuration.nix new file mode 100644 index 0000000..fb70d97 --- /dev/null +++ b/hosts/nixos/hardware-configuration.nix @@ -0,0 +1,30 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/439bb7c9-9b00-4899-944b-d0606f4c90db"; + fsType = "ext4"; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + virtualisation.virtualbox.guest.enable = true; +}