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
66[ examples] ( https://github.com/nix-community/disko/tree/master/example ) .
77
88Let's assume that your NixOS configuration lives in ` configuration.nix ` and your
9- target machine is called ` machine ` .
9+ target machine is called ` machine ` :
1010
1111``` nix
1212# configuration.nix
1313{
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 = []; },
1520}:
16- {
17- config = { config, pkgs, ... }: { /* ... */ };
21+ rec {
1822 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+ };
1932}
2033```
2134
You can’t perform that action at this time.
0 commit comments