Compare commits

..

No commits in common. "a191be5420a91c116b58c11d52c6c8637a7140c9" and "e68ccbb8613c35aee0e6c4b8c62a02b50615921d" have entirely different histories.

3 changed files with 111 additions and 88 deletions

View file

@ -2,23 +2,30 @@
let let
mkNginxVHosts = inputs.self.lib.mkNginxVHosts; mkNginxVHosts = inputs.self.lib.mkNginxVHosts;
openWebUiPort = 8080; opencodePort = 58801;
opencodePackage = inputs.nix-ai-tools.packages.${pkgs.stdenv.hostPlatform.system}.opencode;
in in
{ {
services.nginx.virtualHosts = mkNginxVHosts { services.nginx.virtualHosts = mkNginxVHosts {
domains = { domains = {
"ai.baduhai.dev".locations."/".proxyPass = "http://127.0.0.1:${toString openWebUiPort}/"; "ai.baduhai.dev".locations."/".proxyPass = "http://127.0.0.1:${toString opencodePort}/";
}; };
}; };
services.open-webui = { systemd.services.opencode-web = {
enable = true; description = "OpenCode Web UI";
package = inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.open-webui; wantedBy = [ "multi-user.target" ];
host = "127.0.0.1"; after = [ "network.target" ];
port = openWebUiPort; serviceConfig = {
environment = { Type = "simple";
WEBUI_URL = "https://ai.baduhai.dev"; DynamicUser = true;
StateDirectory = "opencode-web";
WorkingDirectory = "/var/lib/opencode-web";
Environment = "HOME=/var/lib/opencode-web";
ExecStart = "${opencodePackage}/bin/opencode web --hostname 127.0.0.1 --port ${toString opencodePort}";
Restart = "on-failure";
RestartSec = "5s";
}; };
}; };
} }

View file

@ -44,7 +44,7 @@
host = "alexandria"; host = "alexandria";
} }
{ {
name = "open-webui"; name = "opencode-web";
domain = "ai.baduhai.dev"; domain = "ai.baduhai.dev";
host = "alexandria"; host = "alexandria";
} }

172
flake.lock generated
View file

@ -61,11 +61,11 @@
"base16-helix": { "base16-helix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1776754714, "lastModified": 1760703920,
"narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=", "narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "base16-helix", "repo": "base16-helix",
"rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581", "rev": "d646af9b7d14bff08824538164af99d0c521b185",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -122,6 +122,7 @@
"nix-ai-tools", "nix-ai-tools",
"flake-parts" "flake-parts"
], ],
"import-tree": "import-tree_2",
"nixpkgs": [ "nixpkgs": [
"nix-ai-tools", "nix-ai-tools",
"nixpkgs" "nixpkgs"
@ -136,16 +137,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777369708, "lastModified": 1776182890,
"narHash": "sha256-1xW7cRZNsFNPQD+cE0fwnLVStnDth0HSoASEIFeT7uI=", "narHash": "sha256-+/VOe8XGq5klpU+I19D+3TcaR7o+Cwbq67KNF7mcFak=",
"owner": "nix-community", "owner": "Mic92",
"repo": "bun2nix", "repo": "bun2nix",
"rev": "e659e1cc4b8e1b21d0aa85f1c481f9db61ecfa98", "rev": "648d293c51e981aec9cb07ba4268bc19e7a8c575",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "Mic92",
"ref": "staging-2.1.0", "ref": "catalog-support",
"repo": "bun2nix", "repo": "bun2nix",
"type": "github" "type": "github"
} }
@ -177,11 +178,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1777713215, "lastModified": 1776613567,
"narHash": "sha256-8GzXDOXckDWwST8TY5DbwYFjdvQLlP7K9CLSVx6iTTo=", "narHash": "sha256-gC9Cp5ibBmGD5awCA9z7xy6MW6iJufhazTYJOiGlCUI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "63b4e7e6cf75307c1d26ac3762b886b5b0247267", "rev": "32f4236bfc141ae930b5ba2fb604f561fed5219d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -193,11 +194,11 @@
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1776136500, "lastModified": 1775176642,
"narHash": "sha256-r0gN2brVWA351zwMV0Flmlcd6SGMvYqFbvC3DfKFM8Y=", "narHash": "sha256-2veEED0Fg7Fsh81tvVDNYR6SzjqQxa7hbi18Jv4LWpM=",
"owner": "rafaelmardojai", "owner": "rafaelmardojai",
"repo": "firefox-gnome-theme", "repo": "firefox-gnome-theme",
"rev": "0f8ba203d475587f477e7ae12661bd8459e225b7", "rev": "179704030c5286c729b5b0522037d1d51341022c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -227,11 +228,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1777678872, "lastModified": 1775087534,
"narHash": "sha256-EPIFsulyon7Z1vLQq5Fk64GR8L7cQsT+IPhcsukVbgk=", "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "5250617bffd85403b14dbf43c3870e7f255d2c16", "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -248,11 +249,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777678872, "lastModified": 1775087534,
"narHash": "sha256-EPIFsulyon7Z1vLQq5Fk64GR8L7cQsT+IPhcsukVbgk=", "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "5250617bffd85403b14dbf43c3870e7f255d2c16", "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -382,11 +383,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777815398, "lastModified": 1776777932,
"narHash": "sha256-MrIhEoqXc4YsHEUfH4rDU/K09XnWcKntNhCjs7n7zi8=", "narHash": "sha256-0R3Yow/NzSeVGUke5tL7CCkqmss4Vmi6BbV6idHzq/8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b5e86c1b19f178a8ee10f7cb747325e02e3d3991", "rev": "5d5640599a0050b994330328b9fd45709c909720",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -472,6 +473,21 @@
"type": "github" "type": "github"
} }
}, },
"import-tree_2": {
"locked": {
"lastModified": 1763762820,
"narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=",
"owner": "vic",
"repo": "import-tree",
"rev": "3c23749d8013ec6daa1d7255057590e9ca726646",
"type": "github"
},
"original": {
"owner": "vic",
"repo": "import-tree",
"type": "github"
}
},
"nix-ai-tools": { "nix-ai-tools": {
"inputs": { "inputs": {
"blueprint": "blueprint", "blueprint": "blueprint",
@ -482,11 +498,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1777833737, "lastModified": 1776828739,
"narHash": "sha256-vr9mvM9VQjd7p0vuBlKpb2Ia4fCEqiFSqH69hZn24U0=", "narHash": "sha256-Uo1SvxXlqcxbpoew8deTAbBWDlA/LnkiXQ1PIb95fUA=",
"owner": "numtide", "owner": "numtide",
"repo": "llm-agents.nix", "repo": "llm-agents.nix",
"rev": "aba65497c7a653e78ac3966b8d3e0ace6c0f469f", "rev": "bb6fb1ef73d5a46877a3fc623fedef5cbf3939e3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -497,11 +513,11 @@
}, },
"nix-flatpak": { "nix-flatpak": {
"locked": { "locked": {
"lastModified": 1777402031, "lastModified": 1776625032,
"narHash": "sha256-6gkfl9y3+ti0Z6dgby8/R4/DRT8sWU0I0TLCIxwWtjk=", "narHash": "sha256-edvwHiFhgOiwywt6/Iwe+sSn6ybhU3WZGnIoiGcKjfQ=",
"owner": "gmodena", "owner": "gmodena",
"repo": "nix-flatpak", "repo": "nix-flatpak",
"rev": "22a3adbe7c5c8c8a10a635d32c9ef7fc01a6e4b8", "rev": "479e19f1decb390aa5b75cae13ddf87d763c74cc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -518,11 +534,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777787189, "lastModified": 1776829403,
"narHash": "sha256-2KUbS/HhzWW3kkkY1+RiWj9mJ76VEXw8lBJzcCFKzfY=", "narHash": "sha256-oHVcvP2Ahhj1KUsEzp+2BQF55/r5VSa3QxdPdwE1p00=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "2dea2b920e7127b3afa8506713f23536651de312", "rev": "c43246d4e9e506178b69baed075d797ec2d873e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -539,11 +555,11 @@
"optnix": "optnix" "optnix": "optnix"
}, },
"locked": { "locked": {
"lastModified": 1777152325, "lastModified": 1776470276,
"narHash": "sha256-8z6TM8o91moN+rhgzErnhluIHaS5X9B2xvZnIwFA88I=", "narHash": "sha256-qW2K6cxmiiRkaf86T2YHr/q2vm9Ozy42bodUNTfbrJY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-cli", "repo": "nixos-cli",
"rev": "ad72187c1628a409f8bb7a9256cca94c0362c5b9", "rev": "3d02dc9988106743164ffb9e6b8838140f8c66c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -570,11 +586,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1777168982, "lastModified": 1774748309,
"narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", "narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", "rev": "333c4e0545a6da976206c74db8773a1645b5870a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -600,11 +616,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1777673416, "lastModified": 1776560675,
"narHash": "sha256-5c2POKPOjU40Kh0MirOdScBLG0bu9TAuPYAtPRNZMBs=", "narHash": "sha256-p68udKWWh7+V4ZPpcMDq0gTHWNZJnr4JPI+kHPPE40o=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "26ef669cffa904b6f6832ab57b77892a37c1a671", "rev": "e07580dae39738e46609eaab8b154de2488133ce",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -632,11 +648,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1777641297, "lastModified": 1776329215,
"narHash": "sha256-WNGcmeOZ8Tr9dq6ztCspYbzWFswr2mPebM9LpsfGxPk=", "narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c6d65881c5624c9cae5ea6cedef24699b0c0a4c0", "rev": "b86751bc4085f48661017fa226dee99fab6c651b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -664,11 +680,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1777578337, "lastModified": 1776548001,
"narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=", "narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "15f4ee454b1dce334612fa6843b3e05cf546efab", "rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -680,11 +696,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1777268161, "lastModified": 1775036866,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76", "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -734,11 +750,11 @@
"noctalia-qs": "noctalia-qs" "noctalia-qs": "noctalia-qs"
}, },
"locked": { "locked": {
"lastModified": 1777772763, "lastModified": 1776774185,
"narHash": "sha256-MIFrNTX+x42UdOiL9lWmwyyymh80/pxtU4afvEizZDk=", "narHash": "sha256-riCnQWAxvltNd6KrkzQLdG2EMxODNxjQOB2Z67DA4KU=",
"owner": "noctalia-dev", "owner": "noctalia-dev",
"repo": "noctalia-shell", "repo": "noctalia-shell",
"rev": "f0469d2d6f9b1ca873932dcef6583f9d6a2eee28", "rev": "d7b68652e79bce5813dc4fea7e51636a5da3e1b7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -757,11 +773,11 @@
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1777380063, "lastModified": 1776585574,
"narHash": "sha256-q5mWOEICcZzr+KnjIwDHV9EXiBxOC9cnBpxZbDAViU8=", "narHash": "sha256-j35EWhKoGhKrfcXcAOpoRVgXEPQt41Eukji/h59cnjk=",
"owner": "noctalia-dev", "owner": "noctalia-dev",
"repo": "noctalia-qs", "repo": "noctalia-qs",
"rev": "8742a7a748c43bf44eb6862a8ebd3591ed71502d", "rev": "75d180c28a9ab4470e980f3d6f706ad6c5213add",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -782,11 +798,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777598946, "lastModified": 1775228139,
"narHash": "sha256-X239dAGaU1+gfDj8jKH8GzlqKMcxaVfXOio+uzBOkeE=", "narHash": "sha256-ebbeHmg+V7w8050bwQOuhmQHoLOEOfqKzM1KgCTexK4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "5d55af01c0f86be583931fe99207fc56c14134b3", "rev": "601971b9c89e0304561977f2c28fa25e73aa7132",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -859,11 +875,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1777835090, "lastModified": 1776170745,
"narHash": "sha256-VLH8zPweblCOvpnQXp4fVs7f6Q79YhXF5XFKlOrvIFk=", "narHash": "sha256-Tl1aZVP5EIlT+k0+iAKH018GLHJpLz3hhJ0LNQOWxCc=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "7989a1054b01153212dede6005abfd1576b8328c", "rev": "e3861617645a43c9bbefde1aa6ac54dd0a44bfa9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1003,11 +1019,11 @@
"tinted-schemes": { "tinted-schemes": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1777041405, "lastModified": 1772661346,
"narHash": "sha256-BAGZ7ObFV/9Z61OJZun7ifPyhkuHqNuW1QIhQ8LuzCo=", "narHash": "sha256-4eu3LqB9tPqe0Vaqxd4wkZiBbthLbpb7llcoE/p5HT0=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "schemes", "repo": "schemes",
"rev": "5f868b3a338b6904c47f3833b9c411be641983a8", "rev": "13b5b0c299982bb361039601e2d72587d6846294",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1019,11 +1035,11 @@
"tinted-tmux": { "tinted-tmux": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1777169200, "lastModified": 1772934010,
"narHash": "sha256-h7dDbIzP5hDr9v97w9PL6jdAgXawmj6krcH+959rqpU=", "narHash": "sha256-x+6+4UvaG+RBRQ6UaX+o6DjEg28u4eqhVRM9kpgJGjQ=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "tinted-tmux", "repo": "tinted-tmux",
"rev": "f798c2dce44ef815bb6b8f05a82135c7942d35ac", "rev": "c3529673a5ab6e1b6830f618c45d9ce1bcdd829d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1035,11 +1051,11 @@
"tinted-zed": { "tinted-zed": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1777463218, "lastModified": 1772909925,
"narHash": "sha256-Bhkozqtq3BKLqWTlmKm8uAptfX4aRGI8QX3eEL54Vpc=", "narHash": "sha256-jx/5+pgYR0noHa3hk2esin18VMbnPSvWPL5bBjfTIAU=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "base16-zed", "repo": "base16-zed",
"rev": "5768d08ed2e7944a26a958868cdb073cb8856dae", "rev": "b4d3a1b3bcbd090937ef609a0a3b37237af974df",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1097,11 +1113,11 @@
"systems": "systems_6" "systems": "systems_6"
}, },
"locked": { "locked": {
"lastModified": 1777815457, "lastModified": 1776691047,
"narHash": "sha256-tOHe63NSWVFYBry/KSd5wwF9Khha5AXT5Dqx+Z6ICww=", "narHash": "sha256-A9vBN0QrlmQHbveDox7E3n+Z1lzY8ch3sUcWR+Aiqu8=",
"owner": "vicinaehq", "owner": "vicinaehq",
"repo": "vicinae", "repo": "vicinae",
"rev": "5ab9b061690e9e8695ec62dc793f9a3bda2eb616", "rev": "c0e4aa7dd2c21459cc9015b71841d0847f9749ef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1116,11 +1132,11 @@
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1777564084, "lastModified": 1776844129,
"narHash": "sha256-O9VRkxg+2j+sh+c73wi4VeIBECoqW2PlnCR9Qe1nQKA=", "narHash": "sha256-DaYSEBVzTvUhTuoVe70NHphoq5JKUHqUhlNlN5XnTuU=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "d93443c0f6fdb3b179bed68856f322dba4842612", "rev": "90706e6ab801e4fb7bc53343db67583631936192",
"type": "github" "type": "github"
}, },
"original": { "original": {