blob: 2a15c32b221ec9af586c30a875f9a059ed59b21f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{ 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))
];
}
|