mirror of
https://github.com/lxstinthesky/matrix.git
synced 2025-11-01 08:22:45 +00:00
first succesful deployment of a nixos using nixos-anywhere #4
This commit is contained in:
@@ -11,8 +11,22 @@
|
|||||||
# nix settings
|
# nix settings
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader to work with LUKS
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/55332
|
||||||
|
device = "nodev"; # Don't install to MBR
|
||||||
|
efiSupport = true; # Enable EFI support
|
||||||
|
enableCryptodisk = true; # Enable LUKS support
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# LUKS configuration
|
||||||
|
boot.initrd.luks.devices."crypted" = {
|
||||||
|
device = "/dev/disk/by-partlabel/luks";
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
ESP = {
|
ESP = {
|
||||||
size = "500M";
|
size = "500M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
|
label = "boot";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
@@ -20,12 +21,11 @@
|
|||||||
};
|
};
|
||||||
luks = {
|
luks = {
|
||||||
size = "100%";
|
size = "100%";
|
||||||
|
label = "luks";
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "crypted";
|
name = "crypted";
|
||||||
settings.allowDiscards = true; # Enable SSD TRIM support
|
settings.allowDiscards = true; # Enable SSD TRIM support
|
||||||
passwordFile = "/tmp/secret.key"; # install time key file location
|
|
||||||
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "ext4";
|
format = "ext4";
|
||||||
|
|||||||
Reference in New Issue
Block a user