Init
This commit is contained in:
commit
ae68019de1
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uuidfile
|
16
generate-new-image.sh
Executable file
16
generate-new-image.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
set -x
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
DESTUUID="$(cat $SCRIPT_DIR/uuidfile)"
|
||||||
|
tmpdir=$(mktemp -d)
|
||||||
|
mntdir=$(mktemp -d)
|
||||||
|
if [[ ! -h "/dev/disk/by-uuid/$DESTUUID" ]]; then
|
||||||
|
echo "Error: Drive not inserted"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mount /dev/disk/by-uuid/"$DESTUUID" $mntdir
|
||||||
|
cp $(nix-shell -p nixos-generators --run "nixos-generate --format iso --configuration './image.nix' -o $tmpdir/nixos-image.iso") $mntdir/nixos-x86_64-$(date --iso).iso
|
||||||
|
umount $mntdir
|
||||||
|
rm -rf $tmpdir
|
||||||
|
rmdir $mntdir
|
18
image.nix
Executable file
18
image.nix
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, modulesPath, lib, ... }: {
|
||||||
|
imports = [
|
||||||
|
"${modulesPath}/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
|
||||||
|
];
|
||||||
|
users.users.nixos.openssh.authorizedKeys.keys = [
|
||||||
|
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAINgMYT/3mFn0A/yAkI3BHC246Q+/tZ+3HdBeeyp134e+AAAAGHNzaDp5dWJpa2V5LWJsdWUtZGVza3RvcA== philipp@sarah"
|
||||||
|
];
|
||||||
|
boot.supportedFilesystems = [ "bcachefs" ];
|
||||||
|
isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
||||||
|
nix = {
|
||||||
|
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
keyutils
|
||||||
|
tmux
|
||||||
|
];
|
||||||
|
console.keyMap = "neo";
|
||||||
|
}
|
Loading…
Reference in a new issue