pxeboot with nixos host configured and tested

This commit is contained in:
bogale 2026-10-28 00:27:53 +09:00
commit 2d4cf0b147
9 changed files with 268 additions and 89 deletions

View file

@ -1,10 +1,16 @@
{ config, pkgs, ... }: {
{
config,
lib,
modulesPath,
pkgs,
...
}:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader.limine = {
enable = true;
panicOnChecksumMismatch = true;
secureBoot.enable = true;
};
zswap = {
enable = true;
@ -25,25 +31,14 @@
speedtest-go
];
i18n.defaultLocale = "ru_RU.UTF-8";
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
networking.networkmanager.enable = true;
nix.settings.experimental-features = [
"flakes"
"nix-command"
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
services.swapspace.enable = true;
sops = {
age.keyFile = "/var/lib/sops-nix/key.txt";
defaultSopsFile = ./.secrets.yaml;
secrets.root-passwd = { };
};
system.stateVersion = "26.11";
systemd.tmpfiles.rules = [
"L /root/backup/base/nixos - - - - /etc/nixos"
"L /root/backup/base/sbctl - - - - /var/lib/sbctl"
"L /root/backup/base/sops-nix - - - - /var/lib/sops-nix"
"d /root/backup"
"d /root/backup/base"
];
time.timeZone = "Asia/Chita";
users.users.root.hashedPasswordFile = config.sops.secrets.root-passwd.path;
}