Skip to content

Commit

Permalink
make a working example
Browse files Browse the repository at this point in the history
  • Loading branch information
fricklerhandwerk committed Jun 19, 2024
1 parent 3fbe5f9 commit cc95747
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions docs/howtos/use-without-flakes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ target machine is called `machine`.
```nix
# configuration.nix
{
pkgs ? import (fetchTarball channel:nixos-24.05) {};
sources ? {
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
disko = fetchTarball "https://github.com/nix-community/disko/tarball/v1.6.1";
},
system ? builtins.currentSystem,
pkgs ? import sources.nixpkgs { inherit system; config = {}; overlays = []; },
}:
{
config = { config, pkgs, ... }: { /* ... */ };
rec {
machine = pkgs.nixos config;
config = { config, pkgs, ... }: {
system.stateVersion = "24.05";
imports = [
"${sources.disko}/module.nix"
"${sources.disko}/example/hybrid.nix"
];
disko.devices.disk.main.device = "/dev/sda";
boot.loader.systemd-boot.enable = true;
};
}
```

Expand Down

0 comments on commit cc95747

Please sign in to comment.