From 996d3e934c6ad66b1d502bca94f183a72236a5d0 Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Sat, 12 Nov 2022 14:19:50 -0800 Subject: [PATCH] Added vm host option --- hosts/default.nix | 31 +++++++++++++++++++ hosts/laptop/home.nix | 0 hosts/virtualbox/default.nix | 11 +++++++ .../hardware-configuration.nix | 17 ++-------- 4 files changed, 44 insertions(+), 15 deletions(-) delete mode 100644 hosts/laptop/home.nix create mode 100644 hosts/virtualbox/default.nix rename hosts/{ => virtualbox}/hardware-configuration.nix (71%) diff --git a/hosts/default.nix b/hosts/default.nix index 8eb5bf6..bb57fc2 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -38,4 +38,35 @@ in { } ]; }; + + NicksNixVMBox = lib.nixosSystem { + inherit system; + specialArgs = { inherit user; }; + modules = [ + ./virtualbox + ./configuration.nix + ../modules/plasma_desktop.nix + ../modules/kmonad.nix + { + networking.hostName = "NicksNixVMBox"; + } + kmonad.nixosModules.default + home-manager.nixosModules.home-manager { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { inherit user; }; + users.${user} = { + imports = [ + ./home.nix + ../modules/git.nix + ../modules/urxvt.nix + ../modules/vim.nix + ../modules/zsh.nix + ]; + }; + }; + } + ]; + } } diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix deleted file mode 100644 index e69de29..0000000 diff --git a/hosts/virtualbox/default.nix b/hosts/virtualbox/default.nix new file mode 100644 index 0000000..639428d --- /dev/null +++ b/hosts/virtualbox/default.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + imports = [ (import ./hardware-configuration.nix) ]; + + boot.loader.grub = { + device = "/dev/sda"; + enable = true; + }; + +} diff --git a/hosts/hardware-configuration.nix b/hosts/virtualbox/hardware-configuration.nix similarity index 71% rename from hosts/hardware-configuration.nix rename to hosts/virtualbox/hardware-configuration.nix index 5e3ba62..510346e 100644 --- a/hosts/hardware-configuration.nix +++ b/hosts/virtualbox/hardware-configuration.nix @@ -8,9 +8,9 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; + boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; fileSystems."/" = @@ -18,19 +18,6 @@ fsType = "ext4"; }; - fileSystems."/home" = - { device = "/dev/disk/by-label/HOME"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-label/SWAP"; } - ]; # 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