about summary refs log tree commit diff
path: root/hosts/vm
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2022-06-20 13:17:03 +0000
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-20 13:17:03 +0000
commit0416e7a115c7094a436d326e16e64720df68aa14 (patch)
tree63f15f82e1c2e75e3f03387487b58d45904dfddb /hosts/vm
parentUpdate (diff)
downloadnixos-config-0416e7a115c7094a436d326e16e64720df68aa14.tar.gz
nixos-config-0416e7a115c7094a436d326e16e64720df68aa14.tar.bz2
nixos-config-0416e7a115c7094a436d326e16e64720df68aa14.zip
Add VM host
Diffstat (limited to '')
-rw-r--r--hosts/vm/default.nix25
-rw-r--r--hosts/vm/hardware.nix38
-rw-r--r--hosts/vm/home.nix7
3 files changed, 70 insertions, 0 deletions
diff --git a/hosts/vm/default.nix b/hosts/vm/default.nix
new file mode 100644
index 0000000..cb55ce6
--- /dev/null
+++ b/hosts/vm/default.nix
@@ -0,0 +1,25 @@
+# Edit this configuration file to define what should be installed on
+# your system.  Help is available in the configuration.nix(5) man page
+# and in the NixOS manual (accessible by running ‘nixos-help’).
+
+{ config, pkgs, lib, secrets, hostname, inputs, user, ... }: {
+
+  imports = [
+    # Include the results of the hardware scan.
+    ./hardware.nix
+  ];
+
+  # Pick only one of the below networking options.
+  networking = {
+    # networkmanager.enable = true;  # Easiest to use and most distros use this by default.
+    # Configure network proxy if necessary
+    # proxy.default = "http://user:password@proxy:port/";
+    # proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+  };
+
+  environment.systemPackages = with pkgs;
+    [
+
+    ];
+}
+
diff --git a/hosts/vm/hardware.nix b/hosts/vm/hardware.nix
new file mode 100644
index 0000000..5f331f1
--- /dev/null
+++ b/hosts/vm/hardware.nix
@@ -0,0 +1,38 @@
+{ config, lib, pkgs, modulesPath, ... }:
+{
+  imports = [ ];
+
+  boot = {
+    initrd = {
+      availableKernelModules =
+        [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ];
+      kernelModules = [ ];
+    };
+    kernelModules = [ ];
+    extraModulePackages = [ ];
+    kernelParams = [ "net.ifnames=0" "biosdevname=0" ];
+  };
+
+  fileSystems."/" = {
+    device = "/dev/disk/by-label/nixos";
+    fsType = "ext4";
+  };
+
+  # Define on which hard drive you want to install Grub.
+  boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only
+
+  swapDevices = [ ];
+
+  services.xserver = {
+    # Enable touchpad support (enabled default in most desktopManager).
+    libinput.enable = true;
+  };
+
+  hardware = {
+    opengl = {
+      enable = true;
+      driSupport = true;
+    };
+  };
+  virtualisation.virtualbox.guest.enable = true;
+}
diff --git a/hosts/vm/home.nix b/hosts/vm/home.nix
new file mode 100644
index 0000000..7c9ef1e
--- /dev/null
+++ b/hosts/vm/home.nix
@@ -0,0 +1,7 @@
+{ config, lib, pkgs, inputs, user, hostname, secrets, ... }:
+{
+  home.packages = with pkgs; [
+    #jetbrains.idea-community
+    #qtcreator
+  ];
+}