homelab config (working lenovo + lanzaboote for secure boot)
This commit is contained in:
parent
176b620e43
commit
512a4b1114
13 changed files with 104 additions and 9510 deletions
27
machines/homelab/bootloader.nix
Normal file
27
machines/homelab/bootloader.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sources = import ../../npins;
|
||||
lanzaboote = import sources.lanzaboote { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.initrd.systemd.enable = lib.mkForce false;
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.sbctl
|
||||
];
|
||||
}
|
||||
|
|
@ -1,10 +1,17 @@
|
|||
{
|
||||
imports = [
|
||||
/etc/nixos/modules/security.nix
|
||||
/etc/nixos/modules/nix.nix
|
||||
/etc/nixos/modules/security
|
||||
|
||||
/etc/nixos/modules/ssl.nix
|
||||
/etc/nixos/modules/headscale
|
||||
/etc/nixos/modules/ssh.nix
|
||||
/etc/nixos/modules/tailscale.nix
|
||||
|
||||
/etc/nixos/modules/ipfs
|
||||
|
||||
./hardware-configuration.nix
|
||||
./bootloader.nix
|
||||
./user.nix
|
||||
];
|
||||
|
||||
nix.nixPath = [
|
||||
|
|
@ -17,4 +24,6 @@
|
|||
networking.networkmanager.enable = true;
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
|
|
|||
44
machines/homelab/hardware-configuration.nix
Normal file
44
machines/homelab/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/b51d8dcd-2679-431f-bb18-649e1763921e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B5F7-A1D9";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,21 +0,0 @@
|
|||
echo 'structuredExtraConfig = with pkgs.lib.kernel; {'
|
||||
while read -r line
|
||||
do
|
||||
if ! [[ -z "$line" ]] && ! [[ "$line" =~ "#" ]]; then
|
||||
export NAME=$(echo ${line:7} | cut -d= -f1)
|
||||
export VALUE=$(echo -n $line | cut -d= -f2)
|
||||
echo -n "$NAME = "
|
||||
|
||||
case $VALUE in
|
||||
"y")
|
||||
echo -n "yes";;
|
||||
"n")
|
||||
echo -n "no";;
|
||||
*)
|
||||
echo -n $VALUE;
|
||||
esac;
|
||||
echo ";";
|
||||
fi;
|
||||
done < config;
|
||||
|
||||
echo '};'
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./kernel.nix
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
"dtb=linux-6.18.0+\tegra30-microsoft-surface-rt-efi.dtb"
|
||||
"root=PARTUUID=acbd1234-04"
|
||||
"rw"
|
||||
"rootwait"
|
||||
"console=tty0"
|
||||
"cpuidle.off=1"
|
||||
];
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
}:
|
||||
let
|
||||
aarch32 = pkgs.pkgsCross.armv7l-hf-multiplatform;
|
||||
in
|
||||
aarch32.linux
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
6
machines/homelab/user.nix
Normal file
6
machines/homelab/user.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
users.users.zo = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue