From ed6aac61854509555e39a7ee6e7fa2ac0e463173 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Mon, 5 Nov 2018 14:31:58 +0100 Subject: [PATCH] steveej-t480-work: add NVMe support and user packages --- .../configuration/graphical-fullblown.nix | 6 +++--- .../steveej-t480s-work/configuration.nix | 1 + nix/os/devices/steveej-t480s-work/hw.nix | 18 ++++++++++++------ nix/os/devices/steveej-t480s-work/pkg.nix | 7 +++++++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 nix/os/devices/steveej-t480s-work/pkg.nix diff --git a/nix/home-manager/configuration/graphical-fullblown.nix b/nix/home-manager/configuration/graphical-fullblown.nix index 9d0c8aa..b18a0df 100644 --- a/nix/home-manager/configuration/graphical-fullblown.nix +++ b/nix/home-manager/configuration/graphical-fullblown.nix @@ -1,10 +1,10 @@ { pkgs -, config, -... }: +, config +, ... }: let # gitpkgs = import /home/steveej/src/github/NixOS/nixpkgs {}; - unstablepkgs = import {}; + unstablepkgs = import { config = config.nixpkgs.config; }; in { imports = [ diff --git a/nix/os/devices/steveej-t480s-work/configuration.nix b/nix/os/devices/steveej-t480s-work/configuration.nix index 913e25e..6fd394a 100644 --- a/nix/os/devices/steveej-t480s-work/configuration.nix +++ b/nix/os/devices/steveej-t480s-work/configuration.nix @@ -8,5 +8,6 @@ ./system.nix ./hw.nix + ./pkg.nix ]; } diff --git a/nix/os/devices/steveej-t480s-work/hw.nix b/nix/os/devices/steveej-t480s-work/hw.nix index b2b8293..d8b4ab8 100644 --- a/nix/os/devices/steveej-t480s-work/hw.nix +++ b/nix/os/devices/steveej-t480s-work/hw.nix @@ -1,5 +1,15 @@ { ... }: +let + stage1Modules = [ + "aesni_intel" + "kvm-intel" + "aes_x86_64" + "nvme" + "nvme_core" + ]; + +in { # TASK: new device hardware.encryptedDisk = { @@ -7,12 +17,8 @@ diskId = "nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENX0K827498"; }; - boot.initrd.availableKernelModules = [ - "aesni_intel" - "kvm-intel" - "aes_x86_64" - ]; - + # boot.initrd.availableKernelModules = stage1Modules; + boot.initrd.kernelModules = stage1Modules; boot.extraModprobeConfig = '' options kvm-intel nested=1 options kvm-intel enable_shadow_vmcs=1 diff --git a/nix/os/devices/steveej-t480s-work/pkg.nix b/nix/os/devices/steveej-t480s-work/pkg.nix new file mode 100644 index 0000000..0bbf536 --- /dev/null +++ b/nix/os/devices/steveej-t480s-work/pkg.nix @@ -0,0 +1,7 @@ +{ +... +}: + +{ + home-manager.users.steveej = import ../../../home-manager/configuration/graphical-fullblown.nix; +}