mirror of
https://codeberg.org/privacy1st/nixos-anywhere-example
synced 2024-11-21 22:03:19 +01:00
custom installer ISO with SSH
This commit is contained in:
parent
1a800d6305
commit
7fcc95817d
@ -1,3 +1,10 @@
|
|||||||
# nixos-anywhere-workshop template
|
# nixos-anywhere-workshop template
|
||||||
|
|
||||||
[docs](./template/README.md)
|
[docs](./template/README.md)
|
||||||
|
|
||||||
|
## Build installer ISO with SSH
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix
|
||||||
|
ls result/iso/
|
||||||
|
```
|
||||||
|
19
iso.nix
Normal file
19
iso.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# This module defines a small NixOS installation CD. It does not
|
||||||
|
# contain any graphical stuff.
|
||||||
|
# https://nixos.wiki/wiki/Creating_a_NixOS_live_CD
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
|
||||||
|
|
||||||
|
# Provide an initial copy of the NixOS channel so that the user
|
||||||
|
# doesn't need to run "nix-channel --update" first.
|
||||||
|
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable SSH in the boot process.
|
||||||
|
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
(builtins.readFile ./template/nitrokey.pub)
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user