File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,29 @@ in your NixOS configuration and define disko devices as described in the
6
6
[ examples] ( https://github.com/nix-community/disko/tree/master/example ) .
7
7
8
8
Let's assume that your NixOS configuration lives in ` configuration.nix ` and your
9
- target machine is called ` machine ` .
9
+ target machine is called ` machine ` :
10
10
11
11
``` nix
12
12
# configuration.nix
13
13
{
14
- pkgs ? import (fetchTarball channel:nixos-24.05) {};
14
+ sources ? {
15
+ nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
16
+ disko = fetchTarball "https://github.com/nix-community/disko/tarball/v1.6.1";
17
+ },
18
+ system ? builtins.currentSystem,
19
+ pkgs ? import sources.nixpkgs { inherit system; config = {}; overlays = []; },
15
20
}:
16
- {
17
- config = { config, pkgs, ... }: { /* ... */ };
21
+ rec {
18
22
machine = pkgs.nixos config;
23
+ config = { config, pkgs, ... }: {
24
+ system.stateVersion = "24.05";
25
+ imports = [
26
+ "${sources.disko}/module.nix"
27
+ "${sources.disko}/example/hybrid.nix"
28
+ ];
29
+ disko.devices.disk.main.device = "/dev/sda";
30
+ boot.loader.systemd-boot.enable = true;
31
+ };
19
32
}
20
33
```
21
34
You can’t perform that action at this time.
0 commit comments