I’m trying to configure NixOS with LUKS over LVM as described in [1]. After partitioning the disk (see ‘partition-table.sfdisk’), I did the following:
# mkfs.ext3 /dev/sda1 # cryptsetup luksFormat -i 5000 /dev/sda2 # cryptsetup luksOpen /dev/sda2 main # pvcreate /dev/mapper/main # vgcreate main /dev/mapper/main # lvcreate -n main --extent=100%FREE main # mkfs.ext3 /dev/main/main # mkdir /mnt/boot # mount /dev/sda1 /mnt/boot # mount /dev/main/main /mnt # nixos-generate-config --root /mnt Then I edited ‘configuration.nix’ (attached) according to the wiki page and ran ‘nixos-install’, which failed (see ‘nixos-install.log’). Is anything wrong with the config file? [1] https://nixos.org/wiki/Encrypted_Root_on_NixOS
# partition table of /dev/sda unit: sectors /dev/sda1 : start= 2048, size= 260096, Id=83 /dev/sda2 : start= 262144, size=242305024, Id=83 /dev/sda3 : start= 0, size= 0, Id= 0 /dev/sda4 : start= 0, size= 0, Id= 0
# 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, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda";
boot.initrd.luks.devices = [
{ name = "main"; device = "/dev/sda2"; preLVM = true; }
];
fileSystems = [ {
mountPoint ="/";
device = "/dev/mapper/main";
} {
mountPoint = "/boot";
device = "/dev/sda1";
}
];
networking.hostName = "hostname"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless.
# Select internationalisation properties.
i18n = {
consoleFont = "Lat2-Terminus";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
};
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
# environment.systemPackages = with pkgs; [
# wget
# ];
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "us";
services.xserver.xkbOptions = "eurosign:e";
# Enable the KDE Desktop Environment.
# services.xserver.displayManager.kdm.enable = true;
# services.xserver.desktopManager.kde4.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.extraUsers.guest = {
name = "user";
isNormalUser = true;
uid = 1000;
};
}
building the system configuration... copying NixOS/Nixpkgs sources... finalising the installation... updating GRUB 2 menu... installing the GRUB 2 boot loader on /dev/sda... Installing for i386-pc platform. You have a memory leak (not released memory pool): [0x1a78c30] dtree [0x1a78ed0] dtree Internal error: Unreleased memory pool(s) found. You have a memory leak (not released memory pool): [0x1a78c30] dtree [0x1a78ed0] dtree Internal error: Unreleased memory pool(s) found. You have a memory leak (not released memory pool): [0x1a78c30] dtree [0x1a78ed0] dtree Internal error: Unreleased memory pool(s) found. You have a memory leak (not released memory pool): [0x1a78c30] dtree [0x1a78ed0] dtree Internal error: Unreleased memory pool(s) found. You have a memory leak (not released memory pool): [0x1a78c30] dtree [0x1a78ed0] dtree Internal error: Unreleased memory pool(s) found. You have a memory leak (not released memory pool): [0x1a78c30] dtree [0x1a78ed0] dtree Internal error: Unreleased memory pool(s) found. You have a memory leak (not released memory pool): [0x1a7a410] dtree [0x1a78d90] dtree Internal error: Unreleased memory pool(s) found. You have a memory leak (not released memory pool): [0x1a7a410] dtree [0x1a78d90] dtree Internal error: Unreleased memory pool(s) found. You have a memory leak (not released memory pool): [0x1a7a410] dtree [0x1a78d90] dtree Internal error: Unreleased memory pool(s) found. /nix/store/75vh8l1fkh27mm4hyjs3j3l24qgbrs4s-grub-2.02-git-1de3a4/sbin/grub-install: error: attempt to install to encrypted disk without cryptodisk enabled. Set `GRUB_ENABLE_CRYPTODISK=y' in file `/nix/store/75vh8l1fkh27mm4hyjs3j3l24qgbrs4s-grub-2.02-git-1de3a4/etc/default/grub'.. /nix/store/w7rgpbyqfcz0xfjhmcn05sp6zig8gx8w-install-grub.pl: installation of GRUB on /dev/sda failed
pgpxzOw7oblwv.pgp
Description: PGP signature
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
