-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathflake.nix
70 lines (66 loc) · 1.55 KB
/
flake.nix
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
disko = {
url = "github:nix-community/disko";
};
nix-bitcoin = {
url = "github:fort-nix/nix-bitcoin/release";
};
};
outputs =
{
nixpkgs,
flake-utils,
disko,
nix-bitcoin,
...
}:
let
topLevelModule = {
nix = {
registry = {
nixpkgs.flake = nixpkgs;
};
nixPath = [ "nixpkgs=${nixpkgs}" ];
};
};
in
{
nixosConfigurations = {
myfedimint = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
topLevelModule
nix-bitcoin.nixosModules.default
disko.nixosModules.disko
# CHANGEME: `/dev/vda` is a typically a disk name on VPSes.
# Sometimes `/dev/sda`
# `/dev/nvme0n1` is often used on bare-metal servers. You can
# use `df` on the server to verify.
# Needs to be a whole disk device, not just a partition.
{ disko.devices.disk.disk1.device = "/dev/vda"; }
./configuration.nix
];
};
};
}
//
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells = {
default = pkgs.mkShell {
packages = [
pkgs.just
];
};
};
}
)
;
}