add btcpayserver
This commit is contained in:
parent
8e5f6991f9
commit
b553f45f47
5 changed files with 120 additions and 29 deletions
115
flake.lock
generated
115
flake.lock
generated
|
|
@ -2,9 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"agenix": {
|
"agenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
"darwin": [],
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -37,25 +39,29 @@
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"darwin": {
|
"extra-container": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nix-bitcoin",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"agenix",
|
"nix-bitcoin",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744478979,
|
"lastModified": 1734005403,
|
||||||
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
|
"narHash": "sha256-vgh3TqfkFdnPxREBedw4MQehIDc3N8YyxBOB45n+AvU=",
|
||||||
"owner": "lnl7",
|
"owner": "erikarvstedt",
|
||||||
"repo": "nix-darwin",
|
"repo": "extra-container",
|
||||||
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
|
"rev": "f4de6c329b306a9d3a9798a30e060c166f781baa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "lnl7",
|
"owner": "erikarvstedt",
|
||||||
"ref": "master",
|
"ref": "0.13",
|
||||||
"repo": "nix-darwin",
|
"repo": "extra-container",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -75,6 +81,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"git-hooks": {
|
"git-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": [
|
"flake-compat": [
|
||||||
|
|
@ -144,6 +168,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-bitcoin": {
|
||||||
|
"inputs": {
|
||||||
|
"extra-container": "extra-container",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1761560050,
|
||||||
|
"narHash": "sha256-dbMLlIEamKfXP/Ww205FGDMkfEKd6Pzs/VpxUbSsmtU=",
|
||||||
|
"owner": "fort-nix",
|
||||||
|
"repo": "nix-bitcoin",
|
||||||
|
"rev": "b217b6019c3bba6eba2f2f5a277464b7579c3ab9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "fort-nix",
|
||||||
|
"repo": "nix-bitcoin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-mailserver": {
|
"nixos-mailserver": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blobs": "blobs",
|
"blobs": "blobs",
|
||||||
|
|
@ -171,18 +218,17 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754028485,
|
"lastModified": 1761597516,
|
||||||
"narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=",
|
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "59e69648d345d6e8fef86158c555730fa12af9de",
|
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-25.05",
|
||||||
"repo": "nixpkgs",
|
"type": "indirect"
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-25_05": {
|
"nixpkgs-25_05": {
|
||||||
|
|
@ -201,26 +247,28 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761597516,
|
"lastModified": 1760965567,
|
||||||
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
|
"narHash": "sha256-0JDOal5P7xzzAibvD0yTE3ptyvoVOAL0rcELmDdtSKg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
|
"rev": "cb82756ecc37fa623f8cf3e88854f9bf7f64af93",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixpkgs-unstable",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"nix-bitcoin": "nix-bitcoin",
|
||||||
"nixos-mailserver": "nixos-mailserver",
|
"nixos-mailserver": "nixos-mailserver",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
|
@ -237,6 +285,21 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
||||||
11
flake.nix
11
flake.nix
|
|
@ -9,8 +9,12 @@
|
||||||
};
|
};
|
||||||
agenix = {
|
agenix = {
|
||||||
url = "github:ryantm/agenix";
|
url = "github:ryantm/agenix";
|
||||||
inputs.agenix.inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.agenix.inputs.darwin.follows = "";
|
inputs.darwin.follows = "";
|
||||||
|
};
|
||||||
|
nix-bitcoin = {
|
||||||
|
url = "github:fort-nix/nix-bitcoin";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -18,6 +22,7 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixos-mailserver,
|
nixos-mailserver,
|
||||||
agenix,
|
agenix,
|
||||||
|
nix-bitcoin,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
@ -25,7 +30,7 @@
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
distrust = lib.nixosSystem {
|
distrust = lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [./system ./services nixos-mailserver.nixosModules.default agenix.nixosModules.default];
|
modules = [./system ./services nixos-mailserver.nixosModules.default agenix.nixosModules.default nix-bitcoin.nixosModules.default];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
3
services/btc.nix
Normal file
3
services/btc.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
nix-bitcoin.generateSecrets = true;
|
||||||
|
}
|
||||||
18
services/btcpayserver.nix
Normal file
18
services/btcpayserver.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
let
|
||||||
|
btcpayPort = 8086;
|
||||||
|
onionUrl = "http://yon54asykwaovefzstakipoigbflmfrsw243ezumd7sj4cwtsnjnlyad.onion";
|
||||||
|
in {
|
||||||
|
services = {
|
||||||
|
btcpayserver = {
|
||||||
|
enable = true;
|
||||||
|
port = btcpayPort;
|
||||||
|
lightningBackend = "lnd";
|
||||||
|
};
|
||||||
|
caddy.virtualHosts."https://pay.distrust.network ${onionUrl}".extraConfig = ''
|
||||||
|
reverse_proxy localhost:${toString btcpayPort}
|
||||||
|
'';
|
||||||
|
tor.relay.onionServices."btcpayserver".map = [
|
||||||
|
80
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
./lldap.nix
|
./lldap.nix
|
||||||
# Dante not working right now, possibly misconfigured.
|
# Dante not working right now, possibly misconfigured.
|
||||||
#./dante.nix
|
#./dante.nix
|
||||||
|
./btcpayserver.nix
|
||||||
|
./btc.nix
|
||||||
./vaultwarden.nix
|
./vaultwarden.nix
|
||||||
./mailserver.nix
|
./mailserver.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue