From c581e5d0a321f1ba753a3b9c0a84684cac430947 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Mon, 12 Nov 2018 11:26:22 +0100 Subject: [PATCH] nix/os/devices: add CFB4ED74 --- nix/os/devices/CFB4ED74/boot.nix | 11 +++++++++ nix/os/devices/CFB4ED74/configuration.nix | 12 +++++++++ nix/os/devices/CFB4ED74/hw.nix | 30 +++++++++++++++++++++++ nix/os/devices/CFB4ED74/pkg.nix | 7 ++++++ nix/os/devices/CFB4ED74/system.nix | 21 ++++++++++++++++ 5 files changed, 81 insertions(+) create mode 100644 nix/os/devices/CFB4ED74/boot.nix create mode 100644 nix/os/devices/CFB4ED74/configuration.nix create mode 100644 nix/os/devices/CFB4ED74/hw.nix create mode 100644 nix/os/devices/CFB4ED74/pkg.nix create mode 100644 nix/os/devices/CFB4ED74/system.nix diff --git a/nix/os/devices/CFB4ED74/boot.nix b/nix/os/devices/CFB4ED74/boot.nix new file mode 100644 index 0000000..6e17997 --- /dev/null +++ b/nix/os/devices/CFB4ED74/boot.nix @@ -0,0 +1,11 @@ +{ lib +, ... +}: + +{ + boot.loader.grub.efiSupport = lib.mkForce false; +# boot.loader.grub.efiInstallAsRemovable = lib.mkForce false; +# boot.loader.efi.canTouchEfiVariables = lib.mkForce false; + + boot.extraModulePackages = [ ]; +} diff --git a/nix/os/devices/CFB4ED74/configuration.nix b/nix/os/devices/CFB4ED74/configuration.nix new file mode 100644 index 0000000..617813c --- /dev/null +++ b/nix/os/devices/CFB4ED74/configuration.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + imports = [ + ../../profiles/common/configuration.nix + ../../modules/encryptedDisk.nix + + ./system.nix + ./hw.nix + ./pkg.nix + ]; +} diff --git a/nix/os/devices/CFB4ED74/hw.nix b/nix/os/devices/CFB4ED74/hw.nix new file mode 100644 index 0000000..7a04340 --- /dev/null +++ b/nix/os/devices/CFB4ED74/hw.nix @@ -0,0 +1,30 @@ +{ ... }: + +let + stage1Modules = [ + "aesni_intel" + "kvm-intel" + "aes_x86_64" + + "virtio_balloon" + "virtio_scsi" + "virtio_net" + "virtio_pci" + "virtio_ring" + "virtio" + "scsi_mod" + ]; + +in +{ + # TASK: new device + hardware.encryptedDisk = { + enable = true; + diskId = "scsi-0QEMU_QEMU_HARDDISK_drive-scsi0"; + }; + + boot.initrd.availableKernelModules = stage1Modules; + boot.initrd.kernelModules = stage1Modules; + boot.extraModprobeConfig = '' + ''; +} diff --git a/nix/os/devices/CFB4ED74/pkg.nix b/nix/os/devices/CFB4ED74/pkg.nix new file mode 100644 index 0000000..0bbf536 --- /dev/null +++ b/nix/os/devices/CFB4ED74/pkg.nix @@ -0,0 +1,7 @@ +{ +... +}: + +{ + home-manager.users.steveej = import ../../../home-manager/configuration/graphical-fullblown.nix; +} diff --git a/nix/os/devices/CFB4ED74/system.nix b/nix/os/devices/CFB4ED74/system.nix new file mode 100644 index 0000000..d9618e1 --- /dev/null +++ b/nix/os/devices/CFB4ED74/system.nix @@ -0,0 +1,21 @@ +{ pkgs +, lib +, ... }: + +{ + # TASK: new device + networking.hostName = "CFB4ED74"; # Define your hostname. + + networking.firewall.enable = lib.mkForce false; + + # Kubernetes + # services.kubernetes.roles = ["master" "node"]; + + # virtualization + virtualisation = { + docker.enable = true; + }; + + services.spice-vdagentd.enable = true; + services.qemuGuest.enable = true; +}