Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: quickstart "ISO. What next?" #167

Closed
blaggacao opened this issue Mar 15, 2021 · 6 comments
Closed

doc: quickstart "ISO. What next?" #167

blaggacao opened this issue Mar 15, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@blaggacao
Copy link
Contributor

blaggacao commented Mar 15, 2021

Given one started to plan an environment with devos:

There is a bit of a gap between flashing the ISO of a new host onto a stick and fully managing a host either locally (after having set up network and access rights and cloned the repo onto it) or remotely via deployrs (after having bootstrapped identity and ssh access).

Related: #132 (comment)

documenting my journey so far:

  1. flk iso MyNewHost
  2. dd ...
  3. boot into iso on target host
  4. follow https://nixos.org/manual/nixos/stable/index.html#sec-installation-partitioning
  5. 1), 2) & 3) of https://nixos.org/manual/nixos/stable/index.html#sec-installation-installing, that is:
  • mount /dev/disk/by-label/nixos /mnt
  • mkdir -p /mnt/boot
  • mount /dev/disk/by-label/boot /mnt/boot
  • swapon /dev/sda2
  1. keep target running off of the usb memory card
  2. from original machine: deploy ".#MyNewHost" --hostname 192.168.191.179 --ssh-user nixos & that failed, presumably because according to nixos installer things are to be mounted under /mnt
@blaggacao blaggacao added the enhancement New feature or request label Mar 15, 2021
@blaggacao
Copy link
Contributor Author

blaggacao commented Mar 15, 2021

Maybe we should copy over the current local devos repo onto the iso image like so:

{
    isoImage.contents =
      [
        { source = self;
          target = "/devos/"; # or self.name (if that was to exist)
        }
      ];
}

next to : /~https://github.com/divnix/devos/blob/d7f15a664d20de910611a29167107aee8ff0dbab/lib/devos/devosSystem.nix#L15

Maybe even a little more magic can be done with the help of storeContent so that the flk command proper is available on a live cd... That would be really cool. See the iso module option:

{    isoImage.storeContents = mkOption {
      example = literalExample "[ pkgs.stdenv ]";
      description = ''
        This option lists additional derivations to be included in the
        Nix store in the generated ISO image.
      '';
    };
}

Off topic:
Do we have a branded splash image?

Documenting in preparation of PR:

$ cd /iso/devos
$ nix develop
$ flk install MyNewHost --impure

Why the heck is it --impure? I was getting access to path '/mnt/nix/...' is forbidden in restricted mode.

@blaggacao blaggacao changed the title doc: quickstart "ISO. What next" doc: quickstart "ISO. What next?" Mar 15, 2021
@Pacman99
Copy link
Member

Somewhat unrelated, but if I created an iso from my server's config which has random systemd services(minecraft, matrix, ...). Will those services startup when I boot from the iso? Because it would be really annoying if a bunch of services starting setting up databases and taking up ram while I'm running through the install. But I still want those applications to exist for easy installation.

@blaggacao
Copy link
Contributor Author

Will those services startup when I boot from the iso?

Yes. And indeed that is something that needs more thought, still.

@Pacman99
Copy link
Member

Perhaps as you add the devos source you could remove the modules ++ line. And maybe just add self.packages to environment.systemPackages. Not entirely sure what the best solution is. And I think it should be clarified what the goal of isoConfig is, is it purely for installation? or is there more that needs to be accomplished.

@blaggacao
Copy link
Contributor Author

This is gold price input. Let's safe it for a follow up issue / pr though.

@Pacman99
Copy link
Member

Really looking forward to being able to easily build ISO's for bootstrapping a machine!

blaggacao pushed a commit to blaggacao/devos that referenced this issue Mar 16, 2021
Copy over the nix storepath contents of the top level flake in order
to be able to boostrap a host from a live iso installer conforming to
the devos documentation using it's devshell.

closes divnix#167
blaggacao pushed a commit to blaggacao/devos that referenced this issue Mar 16, 2021
Copy over the nix storepath contents of the top level flake in order
to be able to boostrap a host from a live iso installer conforming to
the devos documentation using it's devshell.

closes divnix#167
@bors bors bot closed this as completed in 3d324e7 Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants