dennis the formatter (#75)
* dennis the formatter * changed comment * fixup
This commit is contained in:
@ -5,12 +5,15 @@ in {
|
||||
options = {
|
||||
boot = {
|
||||
default = libS.mkOpinionatedOption "enable the boot builder";
|
||||
fullDiskEncryption = libS.mkOpinionatedOption "use luks full disk encrytion";
|
||||
useSystemdBoot = libS.mkOpinionatedOption "use systemd boot";
|
||||
cpuType = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "amd";
|
||||
default = "";
|
||||
description = "The cpu-type installed on the server.";
|
||||
};
|
||||
|
||||
amdGPU = libS.mkOpinionatedOption "the system contains a AMD GPU";
|
||||
filesystem = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
@ -18,16 +21,16 @@ in {
|
||||
default = "ext4";
|
||||
description = "The filesystem installed.";
|
||||
};
|
||||
fullDiskEncryption = libS.mkOpinionatedOption "use luks full disk encrytion";
|
||||
useSystemdBoot = libS.mkOpinionatedOption "use systemd boot";
|
||||
};
|
||||
};
|
||||
|
||||
config.boot = lib.mkIf cfg.default {
|
||||
supportedFilesystems = [ cfg.filesystem ];
|
||||
tmp.useTmpfs = true;
|
||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
kernelParams = [ "nordrand" ] ++ lib.optional (cfg.cpuType == "amd") "kvm-amd" ++ lib.optional cfg.fullDiskEncryption "ip=<ip-addr>::<ip-gateway>:<netmask>";
|
||||
initrd = {
|
||||
# networking for netcard kernelModules = [ "e1000e" ];
|
||||
kernelModules = lib.mkIf cfg.amdGPU [ "amdgpu" ];
|
||||
|
||||
network = lib.mkIf cfg.fullDiskEncryption {
|
||||
enable = true;
|
||||
ssh = {
|
||||
@ -37,11 +40,6 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
supportedFilesystems = [ cfg.filesystem ];
|
||||
tmp.useTmpfs = true;
|
||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
kernelParams = [ "nordrand" ] ++ lib.optional (cfg.cpuType == "amd") "kvm-amd" ++ lib.optional cfg.fullDiskEncryption "ip=<ip-addr>::<ip-gateway>:<netmask>";
|
||||
|
||||
zfs = lib.mkIf (cfg.filesystem == "zfs") {
|
||||
enableUnstable = true;
|
||||
devNodes = "/dev/disk/by-id/";
|
||||
@ -49,7 +47,7 @@ in {
|
||||
};
|
||||
|
||||
loader = {
|
||||
efi = { canTouchEfiVariables = false; };
|
||||
efi.canTouchEfiVariables = false;
|
||||
generationsDir.copyKernels = true;
|
||||
systemd-boot.enable = lib.mkIf cfg.useSystemdBoot true;
|
||||
grub = lib.mkIf (!cfg.useSystemdBoot) {
|
||||
|
Reference in New Issue
Block a user