Various changes, and added a live-disk config.
This commit is contained in:
+43
-10
@@ -1,8 +1,13 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
with lib;
|
||||
let
|
||||
|
||||
in {
|
||||
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
||||
|
||||
system.stateVersion = "21.05";
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
@@ -19,34 +24,62 @@
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = pkgs.linuxPackages.zfs;
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "/dev/disk/by-label/nixos-root";
|
||||
device = "/dev/disk/by-label/lambda-root";
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/nixos-root";
|
||||
fsType = "btrfs";
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/lambda-boot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/nixos-boot";
|
||||
fsType = "ext4";
|
||||
"/" = {
|
||||
device = "lambda/transient/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = "lambda/transient/nix";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
"/var/log" = {
|
||||
device = "lambda/transient/logs";
|
||||
fsType = "zfs";
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
device = "lambda/persistent/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
"/state" = {
|
||||
device = "lambda/persistent/state";
|
||||
fsType = "zfs";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/disk/by-label/nixos-swap"; }];
|
||||
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
||||
${pkgs.zfs}/bin/zfs rollback -r lambda/transient/root@blank
|
||||
'';
|
||||
|
||||
swapDevices = [{ device = "/dev/disk/by-label/lambda-swap"; }];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 12;
|
||||
|
||||
hardware.bluetooth.enable = false;
|
||||
|
||||
networking = {
|
||||
hostId = substring 0 8 (fileContents /etc/machine-id);
|
||||
|
||||
macvlans = {
|
||||
intif0 = {
|
||||
interface = "enp3s0f1";
|
||||
|
||||
Reference in New Issue
Block a user