Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # image.nix
- {config, pkgs, ...}:
- {
- # base on the minimal image and include channel
- imports = [
- <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
- <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
- ];
- # enable ssh
- systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
- users.users.root.openssh.authorizedKeys.keys = [
- (builtins.readFile "~/.ssh/id_rsa.pub")
- ];
- }
- # bash
- nix-build '<nixpkgs/nixos>' -E "$(cat image.nix | sed 's:~:$HOME:')"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement