Skip to content

Commit 2248d3c

Browse files
authored
Merge pull request #476 from divnix/update-inputs-22.05
support nixos 22.05 + remove bud and misleading onboarding docs (via #477)
2 parents 29bbac0 + 8d50be0 commit 2248d3c

File tree

17 files changed

+79
-290
lines changed

17 files changed

+79
-290
lines changed

doc/SUMMARY.md

-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
- [Introduction](../README.md)
44
- [Quick Start](./start/index.md)
55
- [ISO](./start/iso.md)
6-
- [Bootstrapping](./start/bootstrapping.md)
7-
- [From NixOS](./start/from-nixos.md)
86
- [Key Concepts](./concepts/index.md)
97
- [Hosts](./concepts/hosts.md)
108
- [Overrides](./concepts/overrides.md)
@@ -18,8 +16,6 @@
1816
- [Concerns]()
1917
- [Secrets](./secrets.md)
2018
- [Tests](./tests.md)
21-
- [Helper Script – `bud`](./bud/index.md)
22-
- [get](./bud/get.md)
2319
- [Integrations](./integrations/index.md)
2420
- [Cachix](./integrations/cachix.md)
2521
- [Deploy RS](./integrations/deploy.md)

doc/bud/get.md

-10
This file was deleted.

doc/bud/index.md

-24
This file was deleted.

doc/concepts/users.md

+5-17
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
Users are a special case of [profiles](profiles.md) that define system
99
users and [home-manager][home-manager] configurations. For your convenience,
1010
home manager is wired in by default so all you have to worry about is declaring
11-
your users. For a fully fleshed out example, check out the developers personal
12-
[branch](https://github.com/divnix/devos/tree/nrd/users/nrd/default.nix).
11+
your users.
1312

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

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

55-
This is great for keeping your environment consistent across Unix systems,
56-
including OSX.
53+
This is great for keeping your environment consistent across Unix-like systems,
54+
including macOS.
5755

58-
### From within the projects devshell:
59-
```sh
60-
# builds the nixos user defined in the NixOS host
61-
bud home NixOS nixos
62-
63-
# build and activate
64-
bud home NixOS nixos switch
65-
```
66-
67-
### Manually from outside the project:
6856
```sh
6957
# build
7058
nix build "github:divnix/devos#[email protected]"
@@ -74,5 +62,5 @@ nix build "github:divnix/devos#[email protected]
7462
```
7563

7664
[home-manager]: https://nix-community.github.io/home-manager
77-
[modules-list]: https://github.com/divnix/devos/tree/main/users/modules/module-list.nix
65+
[modules-list]: https://github.com/divnix/digga/tree/main/users/modules/module-list.nix
7866
[portableuser]: https://digga.divnix.com/api-reference-home.html#homeusers

doc/start/bootstrapping.md

-102
This file was deleted.

doc/start/from-nixos.md

-57
This file was deleted.

doc/start/index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ In addition, the [binary cache](../integrations/cachix.md) is added for faster d
4343
> you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`
4444
4545
## Next Steps:
46+
4647
- [Make installable ISO](./iso.md)
47-
- [Bootstrap Host](./bootstrapping.md)
48-
- [Already on NixOS](./from-nixos.md)
4948

5049

5150
[install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation

doc/start/iso.md

+27-13
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
1-
# ISO
1+
# Installation Media
2+
3+
This project leverages [nix-community/nixos-generators][nixos-generators] for
4+
building machine images. In most cases, you'll probably want to use the
5+
`install-iso` format.
6+
7+
Making an installable ISO for `hosts/bootstrap.nix` is as simple as:
28

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

9-
This works for any host.
15+
Then "burn" the ISO to your USB stick (or CD-R if you like!) following the
16+
[instructions in the NixOS manual][burn] (or using your preferred USB burner).
17+
18+
You can also swap out the `--format` for [any of the others][formats] supported
19+
by nixos-generators.
1020

11-
## ISO image nix store & cache
21+
Continue by following the usual installation instructions in the NixOS manual.
1222

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

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

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

34+
[nixos-generators]: https://github.com/nix-community/nixos-generators
35+
[burn]: https://nixos.org/manual/nixos/stable/index.html#sec-booting-from-usb
36+
[formats]: https://github.com/nix-community/nixos-generators/tree/master/formats

examples/devos/.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,4 @@ result
22
.direnv
33
doc/index.html
44

5-
# Result of bud commands
6-
vm
7-
iso
8-
doi
9-
105
pkgs/_sources/.shake*

examples/devos/flake.nix

+3-9
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,23 @@
88
inputs =
99
{
1010
# Track channels with commits tested and built by hydra
11-
nixos.url = "github:nixos/nixpkgs/nixos-21.11";
11+
nixos.url = "github:nixos/nixpkgs/nixos-22.05";
1212
latest.url = "github:nixos/nixpkgs/nixos-unstable";
1313
# For darwin hosts: it can be helpful to track this darwin-specific stable
1414
# channel equivalent to the `nixos-*` channels for NixOS. For one, these
1515
# channels are more likely to provide cached binaries for darwin systems.
1616
# But, perhaps even more usefully, it provides a place for adding
1717
# darwin-specific overlays and packages which could otherwise cause build
1818
# failures on Linux systems.
19-
nixpkgs-darwin-stable.url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin";
19+
nixpkgs-darwin-stable.url = "github:NixOS/nixpkgs/nixpkgs-22.05-darwin";
2020

2121
digga.url = "github:divnix/digga";
2222
digga.inputs.nixpkgs.follows = "nixos";
2323
digga.inputs.nixlib.follows = "nixos";
2424
digga.inputs.home-manager.follows = "home";
2525
digga.inputs.deploy.follows = "deploy";
2626

27-
bud.url = "github:divnix/bud";
28-
bud.inputs.nixpkgs.follows = "nixos";
29-
bud.inputs.devshell.follows = "digga/devshell";
30-
31-
home.url = "github:nix-community/home-manager/release-21.11";
27+
home.url = "github:nix-community/home-manager/release-22.05";
3228
home.inputs.nixpkgs.follows = "nixos";
3329

3430
darwin.url = "github:LnL7/nix-darwin";
@@ -54,7 +50,6 @@
5450
outputs =
5551
{ self
5652
, digga
57-
, bud
5853
, nixos
5954
, home
6055
, nixos-hardware
@@ -111,7 +106,6 @@
111106
digga.nixosModules.nixConfig
112107
home.nixosModules.home-manager
113108
agenix.nixosModules.age
114-
bud.nixosModules.bud
115109
];
116110
};
117111

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{ profiles, ... }:
22
{
3-
# build with: `bud build bootstrap bootstrapIso`
4-
# reachable on the local link via ssh root@fe80::47%eno1
5-
# where 'eno1' is replaced by your own machine's network
6-
# interface that has the local link to the target machine
73
imports = [
84
# profiles.networking
95
profiles.core.nixos
@@ -13,6 +9,6 @@
139

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

16-
# will be overridden by the bootstrapIso instrumentation
12+
# Required, but will be overridden in the resulting installer ISO.
1713
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
1814
}

0 commit comments

Comments
 (0)