-
Notifications
You must be signed in to change notification settings - Fork 4
/
iso.nix
36 lines (31 loc) · 947 Bytes
/
iso.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# To build the installer for your system's architecture:
#
# nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix
#
# To build a 32-bit installer, overrride the value of the `system` parameter:
#
# nix-build <SAME AS BEFORE> --argStr system i686-linux
#
{ config, pkgs, system ? builtins.currentSystem, ... }:
{
imports = [
# https://nixos.wiki/wiki/Creating_a_NixOS_live_CD
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
];
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
users = {
mutableUsers = false;
users.root.openssh.authorizedKeys.keyFiles = [ ~/.ssh/id_rsa.pub ];
};
environment.etc = {
"install.sh" = {
source = ./install.sh;
mode = "0700";
};
"configuration.nix" = {
source = ./configuration.nix;
mode = "0600";
};
};
}