Adds nixpkgs unstable as a flake input and exposes pkgs-unstable via specialArgs. code-server uses the unstable package so the Claude Code extension version requirement is satisfied. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
1,005 B
Nix
27 lines
1,005 B
Nix
# services/code-server.nix — Web IDE at code.nordhammer.it, protected by Authelia.
|
|
#
|
|
# Run as fred so it has access to ~/nixos-config and the rest of the home dir.
|
|
# Auth is handled entirely by Authelia (auth = "none" disables code-server's own
|
|
# password gate). After deploy, install the Claude extension from a terminal:
|
|
# code-server --install-extension anthropic.claude-code
|
|
# and set ANTHROPIC_API_KEY in ~/.config/code-server/env or via a shell profile.
|
|
{ config, pkgs, lib, pkgs-unstable, ... }:
|
|
{
|
|
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
|
services.code-server = {
|
|
enable = true;
|
|
package = pkgs-unstable.code-server;
|
|
host = "127.0.0.1";
|
|
port = 4444;
|
|
auth = "none";
|
|
user = "fred";
|
|
extraArguments = [
|
|
"--disable-telemetry"
|
|
"--disable-update-check"
|
|
];
|
|
};
|
|
|
|
# Make the claude CLI available in code-server's integrated terminal.
|
|
environment.systemPackages = [ pkgs.claude-code ];
|
|
};
|
|
}
|