forked from aylac.top/nixcfg
this repo has no description

people (myself) say it's impossible to self host a fully functioning knot and i agree with them

Changed files
+248 -1
hosts
jezebel
modules
flake
nixos
profiles
backups
services
tangled-knot
snippets
aylac-top
+176
flake.lock
···
"type": "github"
}
},
+
"flake-utils_2": {
+
"inputs": {
+
"systems": "systems_2"
+
},
+
"locked": {
+
"lastModified": 1694529238,
+
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+
"type": "github"
+
},
+
"original": {
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"type": "github"
+
}
+
},
"fontix": {
"inputs": {
"actions-nix": "actions-nix_2",
···
"type": "github"
}
},
+
"gomod2nix": {
+
"inputs": {
+
"flake-utils": "flake-utils_2",
+
"nixpkgs": [
+
"tangled-core",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1754078208,
+
"narHash": "sha256-YVoIFDCDpYuU3riaDEJ3xiGdPOtsx4sR5eTzHTytPV8=",
+
"owner": "nix-community",
+
"repo": "gomod2nix",
+
"rev": "7f963246a71626c7fc70b431a315c4388a0c95cf",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "gomod2nix",
+
"type": "github"
+
}
+
},
"home-manager": {
"inputs": {
"nixpkgs": [
···
"type": "github"
}
},
+
"htmx-src": {
+
"flake": false,
+
"locked": {
+
"narHash": "sha256-nm6avZuEBg67SSyyZUhjpXVNstHHgUxrtBHqJgowU08=",
+
"type": "file",
+
"url": "https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js"
+
},
+
"original": {
+
"type": "file",
+
"url": "https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js"
+
}
+
},
+
"htmx-ws-src": {
+
"flake": false,
+
"locked": {
+
"narHash": "sha256-2fg6KyEJoO24q0fQqbz9RMaYNPQrMwpZh29tkSqdqGY=",
+
"type": "file",
+
"url": "https://cdn.jsdelivr.net/npm/htmx-ext-ws@2.0.2"
+
},
+
"original": {
+
"type": "file",
+
"url": "https://cdn.jsdelivr.net/npm/htmx-ext-ws@2.0.2"
+
}
+
},
+
"ibm-plex-mono-src": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1731402384,
+
"narHash": "sha256-OwUmrPfEehLDz0fl2ChYLK8FQM2p0G1+EMrGsYEq+6g=",
+
"type": "tarball",
+
"url": "https://github.com/IBM/plex/releases/download/@ibm/plex-mono@1.1.0/ibm-plex-mono.zip"
+
},
+
"original": {
+
"type": "tarball",
+
"url": "https://github.com/IBM/plex/releases/download/@ibm/plex-mono@1.1.0/ibm-plex-mono.zip"
+
}
+
},
+
"indigo": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1753693716,
+
"narHash": "sha256-DMIKnCJRODQXEHUxA+7mLzRALmnZhkkbHlFT2rCQYrE=",
+
"owner": "oppiliappan",
+
"repo": "indigo",
+
"rev": "5f170569da9360f57add450a278d73538092d8ca",
+
"type": "github"
+
},
+
"original": {
+
"owner": "oppiliappan",
+
"repo": "indigo",
+
"type": "github"
+
}
+
},
+
"inter-fonts-src": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1731687360,
+
"narHash": "sha256-5vdKKvHAeZi6igrfpbOdhZlDX2/5+UvzlnCQV6DdqoQ=",
+
"type": "tarball",
+
"url": "https://github.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip"
+
},
+
"original": {
+
"type": "tarball",
+
"url": "https://github.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip"
+
}
+
},
"lanzaboote": {
"inputs": {
"crane": "crane",
···
"ref": "v0.4.2",
"repo": "lanzaboote",
"type": "github"
+
}
+
},
+
"lucide-src": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1754044466,
+
"narHash": "sha256-+exBR2OToB1iv7ZQI2S4B0lXA/QRvC9n6U99UxGpJGs=",
+
"type": "tarball",
+
"url": "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip"
+
},
+
"original": {
+
"type": "tarball",
+
"url": "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip"
}
},
"nix-darwin": {
···
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur",
"secrets": "secrets",
+
"tangled-core": "tangled-core",
"zen-browser": "zen-browser"
}
},
···
"type": "github"
}
},
+
"sqlite-lib-src": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1706631843,
+
"narHash": "sha256-bJoMjirsBjm2Qk9KPiy3yV3+8b/POlYe76/FQbciHro=",
+
"type": "tarball",
+
"url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip"
+
},
+
"original": {
+
"type": "tarball",
+
"url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip"
+
}
+
},
"systems": {
"locked": {
"lastModified": 1681028828,
···
"owner": "nix-systems",
"repo": "default",
"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"
+
}
+
},
+
"tangled-core": {
+
"inputs": {
+
"gomod2nix": "gomod2nix",
+
"htmx-src": "htmx-src",
+
"htmx-ws-src": "htmx-ws-src",
+
"ibm-plex-mono-src": "ibm-plex-mono-src",
+
"indigo": "indigo",
+
"inter-fonts-src": "inter-fonts-src",
+
"lucide-src": "lucide-src",
+
"nixpkgs": [
+
"nixpkgs"
+
],
+
"sqlite-lib-src": "sqlite-lib-src"
+
},
+
"locked": {
+
"lastModified": 1756139281,
+
"narHash": "sha256-A0FYRaFr7rBtJD5DeTDLxF42Yj8MsN3fdd7wgH9dSmk=",
+
"ref": "refs/heads/master",
+
"rev": "8dae47cfb25506690fe32082fb973fabdb57af9f",
+
"revCount": 1234,
+
"type": "git",
+
"url": "https://tangled.sh/@tangled.sh/core"
+
},
+
"original": {
+
"type": "git",
+
"url": "https://tangled.sh/@tangled.sh/core"
}
},
"treefmt-nix": {
+5
flake.nix
···
nur.url = "github:nix-community/NUR";
+
tangled-core = {
+
url = "git+https://tangled.sh/@tangled.sh/core";
+
inputs.nixpkgs.follows = "nixpkgs";
+
};
+
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
+1
hosts/jezebel/default.nix
···
enable = true;
enableCaddy = true;
};
+
tangled-knot.enable = true;
uptime-kuma.enable = true;
};
};
+1
modules/flake/nixos.nix
···
inputs.disko.nixosModules.disko
inputs.home-manager.nixosModules.home-manager
inputs.lanzaboote.nixosModules.lanzaboote
+
inputs.tangled-core.nixosModules.knot
modules.hardware
modules.nixos
modules.snippets
+5
modules/nixos/profiles/backups/default.nix
···
inherit (config.services.jellyseerr) enable;
paths = ["/var/lib/jellyseerr"];
}
+
{
+
name = "tangled-knot";
+
inherit (config.services.tangled-knot) enable;
+
paths = [config.services.tangled-knot.stateDir];
+
}
];
};
}
+1
modules/nixos/services/default.nix
···
./redlib
./syncthing
./tailscale
+
./tangled-knot
./uptime-kuma
./vaultwarden
./webdav-server-rs
+52
modules/nixos/services/tangled-knot/default.nix
···
+
{
+
config,
+
lib,
+
...
+
}: let
+
name = "tangled-knot";
+
cfg = config.myNixOS.services.${name};
+
+
network = config.mySnippets.aylac-top;
+
service = network.networkMap.${name};
+
in {
+
options.myNixOS.services.${name} = {
+
enable = lib.mkEnableOption "${name} server";
+
autoProxy = lib.mkOption {
+
default = true;
+
example = false;
+
description = "${name} auto proxy";
+
type = lib.types.bool;
+
};
+
};
+
+
config = lib.mkIf cfg.enable {
+
services = {
+
caddy.virtualHosts = lib.mkIf cfg.autoProxy {
+
"${service.vHost}" = {
+
extraConfig = ''
+
encode gzip zstd
+
reverse_proxy ${service.hostName}:${toString service.port}
+
'';
+
};
+
+
"ssh.${service.vHost}" = {
+
extraConfig = ''
+
encode gzip zstd
+
reverse_proxy ${service.hostName}:22
+
'';
+
};
+
};
+
+
tangled-knot = {
+
enable = false;
+
openFirewall = true;
+
stateDir = "/home/git";
+
server = {
+
owner = "did:plc:3c6vkaq7xf5kz3va3muptjh5";
+
hostname = service.vHost;
+
listenAddr = "0.0.0.0:${toString service.port}";
+
};
+
};
+
};
+
};
+
}
+7 -1
modules/snippets/aylac-top/default.nix
···
glance = {
inherit (config.mySnippets.tailnet.networkMap.glance) hostName;
inherit (config.mySnippets.tailnet.networkMap.glance) port;
-
vHost = "services.aylac.top";
+
vHost = "home.aylac.top";
+
};
+
+
tangled-knot = {
+
hostName = "jezebel";
+
port = 5555;
+
vHost = "knot.aylac.top";
};
};
};