generated from fedimint/nixos-deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
79 lines (71 loc) · 2.06 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
71
72
73
74
75
76
77
78
79
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
fedimint.url = "github:fedimint/fedimint?ref=refs/tags/v0.4.3";
#fedimint-ui.url = "github:fedimint/ui?rev=b57151db3bc4afa373cd61d67b8677e0ba38ceeb";
#fedimint-ui.url = "path:///home/henrique/Projects/fedimint-ui";
fedimint-ui.url = "github:fedimint/ui?rev=70c90a272e763a426965e79c5e8a830f27c23062";
nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
disko.url = "github:nix-community/disko";
};
nixConfig = {
extra-substituters = [ "https://fedimint.cachix.org" ];
extra-trusted-public-keys = [
"fedimint.cachix.org-1:FpJJjy1iPVlvyv4OMiN5y9+/arFLPcnZhZVVCHCDYTs="
];
};
outputs =
{ nixpkgs
, disko
, fedimint
, fedimint-ui
, nix-bitcoin
, ...
}@inputs:
let
overlays = [
(final: prev: {
fedimintd = fedimint.packages.${final.system}.fedimintd;
fedimint-cli = fedimint.packages.${final.system}.fedimint-cli;
fedimint-ui = fedimint-ui.packages.${final.system}.guardian-ui;
})
];
topLevelModule = {
nixpkgs = {
inherit overlays;
};
nix = {
registry = {
nixpkgs.flake = nixpkgs;
};
nixPath = [ "nixpkgs = ${nixpkgs}" ];
};
};
in
{
nixosConfigurations = {
hetzner = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
# fedimint
fmFqdn = "hensg.dev";
email = "[email protected]";
# bitcoind
operator = "henrique";
dbCache = 2000;
prune = 5000;
# TODO: always encrypter for now, this does not work yet
diskEncrypted = true;
};
modules = [
topLevelModule
nix-bitcoin.nixosModules.default
fedimint.nixosModules.fedimintd
disko.nixosModules.disko
./hosts/hetzner/vps/configuration.nix
];
};
};
};
}