doing all sorts of random stuff, custom isntaller iso, testbed, etc

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-11-23 22:45:02 -06:00
parent bdd5bf83ed
commit 334f73d0a6
9 changed files with 897 additions and 380 deletions

44
utilities/nixos-installers/flake.lock generated Normal file
View file

@ -0,0 +1,44 @@
{
"nodes": {
"root": {
"inputs": {
"stable": "stable",
"unstable": "unstable"
}
},
"stable": {
"locked": {
"lastModified": 1763622513,
"narHash": "sha256-1jQnuyu82FpiSxowrF/iFK6Toh9BYprfDqfs4BB+19M=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c58bc7f5459328e4afac201c5c4feb7c818d604b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1763421233,
"narHash": "sha256-Stk9ZYRkGrnnpyJ4eqt9eQtdFWRRIvMxpNRf4sIegnw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "89c2b2330e733d6cdb5eae7b899326930c2c0648",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -0,0 +1,81 @@
{
description = "NixOS installer ISOs with extra bits I like";
inputs = {
stable.url = "github:nixos/nixpkgs/nixos-25.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
{ stable, unstable, ... }:
let
lib = stable.lib;
systems = lib.systems.flakeExposed;
channels = {
stable = stable;
unstable = unstable;
};
# Build a NixOS system that is an installation ISO with SSH enabled
minimal =
{ nixpkgs, system }:
nixpkgs.lib.nixosSystem {
inherit system;
modules = [
(
{ pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
environment.systemPackages = with pkgs; [
neovim
fastfetch
fzf
];
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = true;
};
};
users.users.nixos = {
password = "password";
initialHashedPassword = lib.mkForce null;
};
users.users.root = {
password = "password";
initialHashedPassword = lib.mkForce null;
};
}
)
];
};
mkIsoPkgsForSystem =
system:
builtins.listToAttrs (
builtins.map (channelName: {
name = "iso-minimal-${channelName}";
value =
(minimal {
nixpkgs = channels.${channelName};
inherit system;
}).config.system.build.isoImage;
}) (builtins.attrNames channels)
);
in
{
packages = lib.genAttrs systems (system: mkIsoPkgsForSystem system);
};
}