From 53f8e2998d8df6a1e8d085d9831caa51e05b1806 Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Mon, 13 Jan 2025 20:45:20 +0530 Subject: [PATCH] feat: Added vscode --- nixos/mirai/services/authelia.nix | 4 +++ nixos/mirai/services/default.nix | 1 + nixos/mirai/services/vscode.nix | 19 ++++++++++++++ nixos/ryu/configuration.nix | 42 +++++++++++++++++-------------- 4 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 nixos/mirai/services/vscode.nix diff --git a/nixos/mirai/services/authelia.nix b/nixos/mirai/services/authelia.nix index c4749ec5..16c1f3c5 100644 --- a/nixos/mirai/services/authelia.nix +++ b/nixos/mirai/services/authelia.nix @@ -35,6 +35,10 @@ domain = "darksailor.dev"; policy = "one_factor"; } + { + domain = "code.darksailor.dev"; + policy = "one_factor"; + } # { # domain = "media.darksailor.dev"; # policy = "one_factor"; diff --git a/nixos/mirai/services/default.nix b/nixos/mirai/services/default.nix index 0ad97c2f..7a0c9eef 100644 --- a/nixos/mirai/services/default.nix +++ b/nixos/mirai/services/default.nix @@ -7,6 +7,7 @@ # ./llama.nix ./nextcloud.nix ./jellyfin.nix + ./vscode.nix ]; services = { nix-serve = { diff --git a/nixos/mirai/services/vscode.nix b/nixos/mirai/services/vscode.nix new file mode 100644 index 00000000..a64fec6b --- /dev/null +++ b/nixos/mirai/services/vscode.nix @@ -0,0 +1,19 @@ +{pkgs, ...}: { + services = { + openvscode-server = { + enable = true; + port = 3000; + host = "0.0.0.0"; + extraPackages = with pkgs; []; + }; + caddy = { + virtualHosts."code.darksailor.dev".extraConfig = '' + forward_auth localhost:5555 { + uri /api/authz/forward-auth + copy_headers Remote-User Remote-Groups Remote-Email Remote-Name + } + reverse_proxy localhost:3000 + ''; + }; + }; +} diff --git a/nixos/ryu/configuration.nix b/nixos/ryu/configuration.nix index a5d75a83..a1cc3fb2 100644 --- a/nixos/ryu/configuration.nix +++ b/nixos/ryu/configuration.nix @@ -153,27 +153,31 @@ # TTYVHangup = true; # TTYVTDisallocate = true; # }; + # services.wireplumber.configPackages = with pkgs; [ bluez ]; + + # environment.etc = { + # "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' + # bluez_monitor.properties = { + # ["bluez5.enable-sbc-xq"] = true, + # ["bluez5.enable-msbc"] = true, + # ["bluez5.enable-hw-volume"] = true, + # ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" + # } + # ''; + # }; hardware = { keyboard.qmk.enable = true; - # services.wireplumber.configPackages = with pkgs; [ bluez ]; - - # environment.etc = { - # "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' - # bluez_monitor.properties = { - # ["bluez5.enable-sbc-xq"] = true, - # ["bluez5.enable-msbc"] = true, - # ["bluez5.enable-hw-volume"] = true, - # ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" - # } - # ''; - # }; - - bluetooth.enable = true; - bluetooth.powerOnBoot = true; - bluetooth.settings = { - General = { - Name = "Ryu"; - Enable = "Source,Sink,Media,Socket"; + bluetooth = { + enable = true; + powerOnBoot = true; + settings = { + General = { + Name = "Ryu"; + Enable = "Source,Sink,Media,Socket"; + ControllerMode = "dual"; + FactConnectable = "true"; + Experimental = "true"; + }; }; }; };