add vscode server microvm and update user configurations
This commit is contained in:
40
hosts/fw/modules/vscode-server.nix
Normal file
40
hosts/fw/modules/vscode-server.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{config, pkgs, lib, ...}:
|
||||
|
||||
let
|
||||
hostname = "vscode-server";
|
||||
unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {
|
||||
config = config.nixpkgs.config;
|
||||
system = pkgs.system;
|
||||
};
|
||||
in {
|
||||
microvm.vms.${hostname} = {
|
||||
autostart = true;
|
||||
config = { config, pkgs, ... }: {
|
||||
networking.hostName = hostname;
|
||||
|
||||
services.code-server = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
port = 8080;
|
||||
auth = "none";
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
github.copilot
|
||||
ms-azuretools.vscode-docker
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
unstable.ddev
|
||||
];
|
||||
|
||||
# Docker is required for ddev
|
||||
virtualisation.docker.enable = true;
|
||||
};
|
||||
|
||||
interfaces = [{
|
||||
type = "tap";
|
||||
id = "vm-${hostname}";
|
||||
mac = "02:00:00:00:01:01";
|
||||
}];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user