mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-12 08:00:05 +01:00
39 lines
809 B
Nix
39 lines
809 B
Nix
{ pkgs, lib, ... }:
|
|
let
|
|
disko = import (builtins.fetchGit {
|
|
url = "https://github.com/nix-community/disko";
|
|
ref = "master";
|
|
}) {
|
|
inherit lib;
|
|
};
|
|
cfg = {
|
|
type = "devices";
|
|
content = {
|
|
sda = {
|
|
type = "table";
|
|
format = "msdos";
|
|
partitions = [{
|
|
type = "partition";
|
|
part-type = "primary";
|
|
start = "1M";
|
|
end = "100%";
|
|
bootable = true;
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
}];
|
|
};
|
|
};
|
|
};
|
|
in {
|
|
imports = [
|
|
(disko.config cfg)
|
|
];
|
|
environment.systemPackages = with pkgs;[
|
|
(pkgs.writeScriptBin "tsp-create" (disko.create cfg))
|
|
(pkgs.writeScriptBin "tsp-mount" (disko.mount cfg))
|
|
];
|
|
}
|
|
|