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

remove bud and misleading onboarding docs #477

Merged
merged 5 commits into from
Jul 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions doc/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
- [Introduction](../README.md)
- [Quick Start](./start/index.md)
- [ISO](./start/iso.md)
- [Bootstrapping](./start/bootstrapping.md)
- [From NixOS](./start/from-nixos.md)
- [Key Concepts](./concepts/index.md)
- [Hosts](./concepts/hosts.md)
- [Overrides](./concepts/overrides.md)
Expand All @@ -18,8 +16,6 @@
- [Concerns]()
- [Secrets](./secrets.md)
- [Tests](./tests.md)
- [Helper Script – `bud`](./bud/index.md)
- [get](./bud/get.md)
- [Integrations](./integrations/index.md)
- [Cachix](./integrations/cachix.md)
- [Deploy RS](./integrations/deploy.md)
Expand Down
10 changes: 0 additions & 10 deletions doc/bud/get.md

This file was deleted.

24 changes: 0 additions & 24 deletions doc/bud/index.md

This file was deleted.

22 changes: 5 additions & 17 deletions doc/concepts/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
Users are a special case of [profiles](profiles.md) that define system
users and [home-manager][home-manager] configurations. For your convenience,
home manager is wired in by default so all you have to worry about is declaring
your users. For a fully fleshed out example, check out the developers personal
[branch](https://github.com/divnix/devos/tree/nrd/users/nrd/default.nix).
your users.

## Basic Usage
`users/myuser/default.nix`:
Expand Down Expand Up @@ -49,22 +48,11 @@ argument that gets passed to your home-manager users.

## External Usage
You can easily use the defined home-manager configurations outside of NixOS
using the `homeConfigurations` flake output. The [bud](../bud/index.md) helper
script makes this even easier.
using the `homeConfigurations` flake output.

This is great for keeping your environment consistent across Unix systems,
including OSX.
This is great for keeping your environment consistent across Unix-like systems,
including macOS.

### From within the projects devshell:
```sh
# builds the nixos user defined in the NixOS host
bud home NixOS nixos

# build and activate
bud home NixOS nixos switch
```

### Manually from outside the project:
```sh
# build
nix build "github:divnix/devos#[email protected]"
Expand All @@ -74,5 +62,5 @@ nix build "github:divnix/devos#[email protected]
```

[home-manager]: https://nix-community.github.io/home-manager
[modules-list]: https://github.com/divnix/devos/tree/main/users/modules/module-list.nix
[modules-list]: https://github.com/divnix/digga/tree/main/users/modules/module-list.nix
[portableuser]: https://digga.divnix.com/api-reference-home.html#homeusers
102 changes: 0 additions & 102 deletions doc/start/bootstrapping.md

This file was deleted.

57 changes: 0 additions & 57 deletions doc/start/from-nixos.md

This file was deleted.

3 changes: 1 addition & 2 deletions doc/start/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ In addition, the [binary cache](../integrations/cachix.md) is added for faster d
> you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`

## Next Steps:

- [Make installable ISO](./iso.md)
- [Bootstrap Host](./bootstrapping.md)
- [Already on NixOS](./from-nixos.md)


[install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation
40 changes: 27 additions & 13 deletions doc/start/iso.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
# ISO
# Installation Media

This project leverages [nix-community/nixos-generators][nixos-generators] for
building machine images. In most cases, you'll probably want to use the
`install-iso` format.

Making an installable ISO for `hosts/bootstrap.nix` is as simple as:

Making and writing an installable iso for `hosts/bootstrap.nix` is as simple as:
```sh
bud build bootstrap bootstrapIso
sudo -E $(which bud) burn
nix run github:nix-community/nixos-generators -- \
--format install-iso \
--flake '.#bootstrap'
```

This works for any host.
Then "burn" the ISO to your USB stick (or CD-R if you like!) following the
[instructions in the NixOS manual][burn] (or using your preferred USB burner).

You can also swap out the `--format` for [any of the others][formats] supported
by nixos-generators.

## ISO image nix store & cache
Continue by following the usual installation instructions in the NixOS manual.

The iso image holds the store to the live environment and _also_ acts as a binary cache
to the installer. To considerably speed up things, the image already includes all flake
`inputs` as well as the `devshell` closures.
## ISO Nix Store and Cache

While you _could_ provision any machine with a single stick, a custom-made iso for
the host you want to install DevOS to, maximises those local cache hits.
The ISO image holds the Nix store for the live environment and _also_ acts as a
binary cache to the installer. To considerably speed things up, the image
already includes all flake `inputs` as well as the `devshell` closures.

For hosts that don't differ too much, a single usb stick might be ok, whereas when
there are bigger differences, a custom-made usb stick will be considerably faster.
While you _could_ provision any NixOS machine with the same USB stick, an ISO
custom-made for your target host will maximise those local cache hits. For hosts
that don't differ too much, a single USB stick might be ok, whereas when there
are bigger differences, a custom-made USB stick will be considerably faster.

[nixos-generators]: https://github.com/nix-community/nixos-generators
[burn]: https://nixos.org/manual/nixos/stable/index.html#sec-booting-from-usb
[formats]: https://github.com/nix-community/nixos-generators/tree/master/formats
5 changes: 0 additions & 5 deletions examples/devos/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@ result
.direnv
doc/index.html

# Result of bud commands
vm
iso
doi

pkgs/_sources/.shake*
6 changes: 0 additions & 6 deletions examples/devos/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
digga.inputs.home-manager.follows = "home";
digga.inputs.deploy.follows = "deploy";

bud.url = "github:divnix/bud";
bud.inputs.nixpkgs.follows = "nixos";
bud.inputs.devshell.follows = "digga/devshell";

home.url = "github:nix-community/home-manager/release-22.05";
home.inputs.nixpkgs.follows = "nixos";

Expand All @@ -54,7 +50,6 @@
outputs =
{ self
, digga
, bud
, nixos
, home
, nixos-hardware
Expand Down Expand Up @@ -111,7 +106,6 @@
digga.nixosModules.nixConfig
home.nixosModules.home-manager
agenix.nixosModules.age
bud.nixosModules.bud
];
};

Expand Down
6 changes: 1 addition & 5 deletions examples/devos/hosts/nixos/bootstrap.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{ profiles, ... }:
{
# build with: `bud build bootstrap bootstrapIso`
# reachable on the local link via ssh root@fe80::47%eno1
# where 'eno1' is replaced by your own machine's network
# interface that has the local link to the target machine
imports = [
# profiles.networking
profiles.core.nixos
Expand All @@ -13,6 +9,6 @@

boot.loader.systemd-boot.enable = true;

# will be overridden by the bootstrapIso instrumentation
# Required, but will be overridden in the resulting installer ISO.
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
}
4 changes: 1 addition & 3 deletions examples/devos/shell/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{ self, inputs, ... }:
{
modules = with inputs; [
bud.devshellModules.bud
];
modules = with inputs; [];
exportedModules = [
./devos.nix
];
Expand Down