Kieran's opinionated (and probably slightly dumb) nix config

feat: add tangled knot and spindle

dunkirk.sh f5c5e91e e077c523

verified
Changed files
+265
machines
terebithia
+208
flake.lock
···
{
"nodes": {
+
"actor-typeahead-src": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1762835797,
+
"narHash": "sha256-heizoWUKDdar6ymfZTnj3ytcEv/L4d4fzSmtr0HlXsQ=",
+
"ref": "refs/heads/main",
+
"rev": "677fe7f743050a4e7f09d4a6f87bbf1325a06f6b",
+
"revCount": 6,
+
"type": "git",
+
"url": "https://tangled.org/@jakelazaroff.com/actor-typeahead"
+
},
+
"original": {
+
"type": "git",
+
"url": "https://tangled.org/@jakelazaroff.com/actor-typeahead"
+
}
+
},
"agenix": {
"inputs": {
"darwin": "darwin",
···
"type": "github"
}
},
+
"flake-compat_3": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1751685974,
+
"narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=",
+
"rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1",
+
"type": "tarball",
+
"url": "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz?rev=549f2762aebeff29a2e5ece7a7dc0f955281a1d1"
+
},
+
"original": {
+
"type": "tarball",
+
"url": "https://git.lix.systems/lix-project/flake-compat/archive/main.tar.gz"
+
}
+
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
···
"type": "github"
}
},
+
"flake-utils_6": {
+
"inputs": {
+
"systems": "systems_9"
+
},
+
"locked": {
+
"lastModified": 1694529238,
+
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+
"type": "github"
+
},
+
"original": {
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"type": "github"
+
}
+
},
"flare": {
"inputs": {
"flake-utils": "flake-utils_3",
···
"type": "github"
}
},
+
"gomod2nix": {
+
"inputs": {
+
"flake-utils": "flake-utils_6",
+
"nixpkgs": [
+
"tangled",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1754078208,
+
"narHash": "sha256-YVoIFDCDpYuU3riaDEJ3xiGdPOtsx4sR5eTzHTytPV8=",
+
"owner": "nix-community",
+
"repo": "gomod2nix",
+
"rev": "7f963246a71626c7fc70b431a315c4388a0c95cf",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "gomod2nix",
+
"type": "github"
+
}
+
},
"hardware": {
"locked": {
"lastModified": 1764080039,
···
"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"
+
}
+
},
"hyprland-contrib": {
"inputs": {
"nixpkgs": [
···
"type": "github"
}
},
+
"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"
+
}
+
},
"import-tree": {
"locked": {
"lastModified": 1763762820,
···
"type": "github"
}
},
+
"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"
+
}
+
},
"ixx": {
"inputs": {
"flake-utils": [
···
"ref": "v0.0.6",
"repo": "ixx",
"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": {
···
"nur": "nur",
"soapdump": "soapdump",
"spicetify-nix": "spicetify-nix",
+
"tangled": "tangled",
"terminal-wakatime": "terminal-wakatime",
"wakatime-ls": "wakatime-ls"
}
···
"owner": "Gerg-L",
"repo": "spicetify-nix",
"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": {
···
"owner": "nix-systems",
"repo": "default",
"type": "github"
+
}
+
},
+
"systems_9": {
+
"locked": {
+
"lastModified": 1681028828,
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+
"owner": "nix-systems",
+
"repo": "default",
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-systems",
+
"repo": "default",
+
"type": "github"
+
}
+
},
+
"tangled": {
+
"inputs": {
+
"actor-typeahead-src": "actor-typeahead-src",
+
"flake-compat": "flake-compat_3",
+
"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": 1764005195,
+
"narHash": "sha256-PzuWiW/nMxwQTX0i1bHwGazQF4ptLNI9OGwpmhDb9i0=",
+
"ref": "refs/heads/master",
+
"rev": "7358ec6edfa4d17b8b8f543d99e83a4705901148",
+
"revCount": 1687,
+
"type": "git",
+
"url": "https://tangled.org/tangled.org/core"
+
},
+
"original": {
+
"type": "git",
+
"url": "https://tangled.org/tangled.org/core"
},
"terminal-wakatime": {
+6
flake.nix
···
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+
tangled = {
+
url = "git+https://tangled.org/tangled.org/core";
+
inputs.nixpkgs.follows = "nixpkgs";
+
};
};
outputs =
···
nur,
nix-darwin,
deploy-rs,
+
tangled,
...
}@inputs:
let
+51
machines/terebithia/default.nix
···
./home-manager.nix
(inputs.import-tree ../../modules/nixos)
+
inputs.tangled.nixosModules.knot
+
inputs.tangled.nixosModules.spindle
];
nixpkgs = {
···
globalConfig = ''
acme_dns cloudflare {env.CLOUDFLARE_API_TOKEN}
'';
+
virtualHosts."knot.dunkirk.sh" = {
+
extraConfig = ''
+
tls {
+
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
+
}
+
header {
+
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
+
}
+
reverse_proxy localhost:5555 {
+
header_up X-Forwarded-Proto {scheme}
+
header_up X-Forwarded-For {remote}
+
}
+
'';
+
};
+
virtualHosts."spindle.dunkirk.sh" = {
+
extraConfig = ''
+
tls {
+
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
+
}
+
header {
+
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
+
}
+
reverse_proxy localhost:6555 {
+
header_up X-Forwarded-Proto {scheme}
+
header_up X-Forwarded-For {remote}
+
}
+
'';
+
};
extraConfig = ''
# Default response for unhandled domains
:80 {
···
enable = true;
domain = "hn.dunkirk.sh";
secretsFile = config.age.secrets.hn-alerts.path;
+
};
+
+
services.tangled.knot = {
+
enable = true;
+
package = inputs.tangled.packages.aarch64-linux.knot;
+
appviewEndpoint = "https://tangled.org";
+
server = {
+
owner = "did:plc:krxbvxvis5skq7jj6eot23ul";
+
hostname = "knot.dunkirk.sh";
+
listenAddr = "127.0.0.1:5555";
+
};
+
};
+
+
services.tangled.spindle = {
+
enable = true;
+
package = inputs.tangled.packages.aarch64-linux.spindle;
+
server = {
+
owner = "did:plc:krxbvxvis5skq7jj6eot23ul";
+
hostname = "spindle.dunkirk.sh";
+
listenAddr = "127.0.0.1:6555";
+
};
};
boot.loader.systemd-boot.enable = true;