feat!: prepare homelab

This commit is contained in:
2025-12-22 14:52:27 -08:00
parent 2a54f011c8
commit 01294f3b8c
4 changed files with 17 additions and 18 deletions

View File

@@ -2,17 +2,16 @@
description = "Homelab"; description = "Homelab";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = outputs =
{ inputs@{
self,
nixpkgs, nixpkgs,
disko, disko,
}@inputs: }:
let let
nodes = [ nodes = [
{ {
@@ -31,12 +30,14 @@
meta = { meta = {
hostname = node.name; hostname = node.name;
}; };
inherit inputs;
}; };
modules = [ modules = [
disko.nixosModules.disko disko.nixosModules.disko
./${node.name}-configuration.nix ../modules/keys.nix
./${node.name}-hardware-configuration.nix ./nodes/${node.name}/configuration.nix
./${node.name}-disk-config.nix ./nodes/${node.name}/hardware-configuration.nix
./nodes/${node.name}/disk-config.nix
]; ];
}; };
}) nodes }) nodes

View File

@@ -10,10 +10,12 @@
imports = [ imports = [
]; ];
boot.loader.grub.enable = true; boot.loader.grub = {
boot.loader.grub.efiSupport = true; enable = true;
boot.loader.grub.efiInstallAsRemovable = true; efiSupport = true;
boot.loader.grub.device = "/dev/nvme0n1"; efiInstallAsRemovable = true;
device = "/dev/nvme0n1";
};
networking.hostName = meta.hostname; networking.hostName = meta.hostname;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@@ -48,7 +50,7 @@
packages = with pkgs; [ packages = with pkgs; [
tree tree
]; ];
hashedPassword = "$6$BZKOzqbNgj8F2JDm$KVpnMK1inaM0tnHSw6dIlA1oZ7sT/j7RQL4u5wa9RHYeHcqEFILTqi0HGKCYIwhCEWuJIhBv3h.tjSCZ/j6yw/"; hashedPassword = config.hashedPassword;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@@ -63,6 +65,6 @@
services.openssh.enable = true; services.openssh.enable = true;
system.stateVersion = "25.05"; system.stateVersion = "25.11";
} }

View File

@@ -7,13 +7,9 @@
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
boot = {
size = "1M";
type = "EF02";
};
ESP = { ESP = {
type = "EF00"; type = "EF00";
size = "512M"; size = "1G";
content = { content = {
type = "filesystem"; type = "filesystem";
mountpoint = "/boot"; mountpoint = "/boot";