Create custom ISO to simplify bootstrapping new installs
This commit is contained in:
parent
4d9fcfed6c
commit
f94f7321a2
3 changed files with 29 additions and 2 deletions
10
machine-confs/generic.nix
Normal file
10
machine-confs/generic.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
networking.hostName = "nixos";
|
||||||
|
|
||||||
|
imports = [ ../base.nix ];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
}
|
17
misc/custom-iso.nix
Normal file
17
misc/custom-iso.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
fetch-config-template = pkgs.writeScriptBin "fetch-config-template" ''
|
||||||
|
mv configuration.nix configuration.nix.old
|
||||||
|
${pkgs.curl}/bin/curl https://raw.githubusercontent.com/VSinerva/nixos-conf/main/misc/template-configuration.nix -o configuration.nix
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
|
||||||
|
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
|
||||||
|
../base.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.networkmanager.enable = pkgs.lib.mkForce false;
|
||||||
|
environment.systemPackages = [ fetch-config-template ];
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
host = "???";
|
host = "generic";
|
||||||
stateVersion = "???";
|
stateVersion = "24.05";
|
||||||
|
|
||||||
repo = builtins.fetchGit {
|
repo = builtins.fetchGit {
|
||||||
url = "https://github.com/VSinerva/nixos-conf.git";
|
url = "https://github.com/VSinerva/nixos-conf.git";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue