Compare commits
6 Commits
70b5d5fd4d
...
main
Author | SHA1 | Date | |
---|---|---|---|
055c399d31
|
|||
4985fd4a89
|
|||
9064fc6d1d
|
|||
3e718fadfc
|
|||
763ee6312a
|
|||
5704ebe712
|
44
hosts/pi4/actual.nix
Normal file
44
hosts/pi4/actual.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{ config, common, ... }:
|
||||||
|
let
|
||||||
|
domain = "beta.budget.${common.domain}";
|
||||||
|
port = 8084;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
internalInterfaces = [ "ve-*" ];
|
||||||
|
externalInterface = "wlan0";
|
||||||
|
# Lazy IPv6 connectivity for the container
|
||||||
|
enableIPv6 = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
containers.actual = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "192.168.10.188";
|
||||||
|
localAddress = "192.168.10.11";
|
||||||
|
config =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [ port ];
|
||||||
|
services = {
|
||||||
|
actual = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
inherit port;
|
||||||
|
loginMethod = "password";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
system.stateVersion = common.system.version;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.nginx.virtualHosts.${domain} = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${config.containers.actual.localAddress}:${toString port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
{
|
{
|
||||||
imports = with lib.custom; [
|
imports = with lib.custom; [
|
||||||
(relativeToBase "modules")
|
(relativeToBase "modules")
|
||||||
|
./actual.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
|
@ -33,6 +33,7 @@ in
|
|||||||
# Beta is currently stable
|
# Beta is currently stable
|
||||||
"www.${domain}" = redirect "";
|
"www.${domain}" = redirect "";
|
||||||
"beta.${domain}" = redirect "";
|
"beta.${domain}" = redirect "";
|
||||||
|
"dev.${domain}" = homelabProxy 4322;
|
||||||
"git.${domain}" = redirect "code";
|
"git.${domain}" = redirect "code";
|
||||||
"kitchenowl.${domain}" = redirect "grocery";
|
"kitchenowl.${domain}" = redirect "grocery";
|
||||||
# Gitea
|
# Gitea
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
{ common, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
@ -6,13 +8,8 @@
|
|||||||
80
|
80
|
||||||
443
|
443
|
||||||
];
|
];
|
||||||
trustedInterfaces = [ "tailscale0" ];
|
extraInputRules = ''
|
||||||
extraInputRules =
|
ip saddr ${common.localIpRange} accept
|
||||||
let
|
|
||||||
localIPv4Range = "192.168.10.0/24";
|
|
||||||
in
|
|
||||||
''
|
|
||||||
ip saddr ${localIPv4Range} accept
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
|
@ -16,6 +16,7 @@ rec {
|
|||||||
domain = "martials.no";
|
domain = "martials.no";
|
||||||
tailnetDomain = "dns.${domain}";
|
tailnetDomain = "dns.${domain}";
|
||||||
localIpPrefix = "192.168.10.";
|
localIpPrefix = "192.168.10.";
|
||||||
|
localIpRange = "${localIpPrefix}0/24";
|
||||||
localIpAddr = subAddr: "${localIpPrefix}${builtins.toString subAddr}";
|
localIpAddr = subAddr: "${localIpPrefix}${builtins.toString subAddr}";
|
||||||
tailnetAddr = host: "${host}.${tailnetDomain}";
|
tailnetAddr = host: "${host}.${tailnetDomain}";
|
||||||
|
|
||||||
|
7
shared/desktop/modules/development/httpie.nix
Normal file
7
shared/desktop/modules/development/httpie.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
httpie-desktop
|
||||||
|
];
|
||||||
|
}
|
Reference in New Issue
Block a user