mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
feat: update bootstrap image
This commit is contained in:
parent
dfce77913b
commit
8e8dd928be
4 changed files with 117 additions and 8 deletions
|
|
@ -1,5 +1,75 @@
|
|||
{username, ...}: {
|
||||
networking.wireless.enable = false;
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# Minimal system without desktop or dev tools
|
||||
fireproof.desktop.enable = false;
|
||||
fireproof.dev.enable = false;
|
||||
fireproof.work.enable = false;
|
||||
fireproof.homelab.enable = false;
|
||||
|
||||
# Use the nixos installation ISO as base
|
||||
imports = [
|
||||
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
];
|
||||
|
||||
# Disable systemd-boot as we're using ISO bootloader
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
# Enable SSH for remote installation
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = lib.mkForce "yes";
|
||||
PasswordAuthentication = lib.mkForce true;
|
||||
KbdInteractiveAuthentication = lib.mkForce true;
|
||||
};
|
||||
};
|
||||
|
||||
# Set a root password for the live environment (override the ISO's empty password)
|
||||
users.users.root = {
|
||||
initialHashedPassword = lib.mkForce null;
|
||||
initialPassword = lib.mkForce "nixos";
|
||||
};
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
users.users.${username}.extraGroups = ["networkmanager"];
|
||||
networking.wireless.enable = lib.mkForce false; # Conflicts with networkmanager
|
||||
|
||||
# Installation tools
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Disk tools
|
||||
gptfdisk
|
||||
parted
|
||||
cryptsetup
|
||||
btrfs-progs
|
||||
dosfstools
|
||||
ntfs3g
|
||||
|
||||
# NixOS installation
|
||||
nixos-install-tools
|
||||
|
||||
# Network tools
|
||||
wget
|
||||
curl
|
||||
git
|
||||
|
||||
# Editors
|
||||
vim
|
||||
nano
|
||||
|
||||
# System tools
|
||||
htop
|
||||
pciutils
|
||||
usbutils
|
||||
lsof
|
||||
|
||||
# Hardware detection
|
||||
nixos-facter
|
||||
];
|
||||
|
||||
# System state version (use mkForce to override the default)
|
||||
system.stateVersion = lib.mkForce "25.11";
|
||||
}
|
||||
|
|
|
|||
7
hosts/bootstrap/disk-configuration.nix
Normal file
7
hosts/bootstrap/disk-configuration.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Bootstrap disk configuration
|
||||
# This is a placeholder - the ISO doesn't use disko for its own disk
|
||||
# but disko is available for formatting target systems
|
||||
_: {
|
||||
# No disko configuration needed for the live USB
|
||||
# The installation medium uses the standard ISO layout
|
||||
}
|
||||
|
|
@ -57,11 +57,6 @@ with lib; let
|
|||
);
|
||||
in {
|
||||
config.flake.nixosConfigurations = {
|
||||
bootstrap = mkSystem {
|
||||
hostname = "bootstrap";
|
||||
username = "nixos";
|
||||
};
|
||||
|
||||
laptop = mkSystem {
|
||||
hostname = "laptop";
|
||||
username = "nickolaj";
|
||||
|
|
@ -78,5 +73,9 @@ in {
|
|||
hostname = "homelab";
|
||||
username = "nickolaj";
|
||||
};
|
||||
bootstrap = mkSystem {
|
||||
hostname = "bootstrap";
|
||||
username = "nickolaj";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue