make vscode settings mutable, try to make gtk theme work on hyprland and
restart portals on login
This commit is contained in:
@@ -1,5 +1,20 @@
|
||||
{ osConfig, config, pkgs, inputs, lib, ... }: {
|
||||
config = lib.mkIf osConfig.custom.graphical.code.enable {
|
||||
config = lib.mkIf osConfig.custom.graphical.code.enable rec {
|
||||
home.activation.makeVSCodeConfigWritable = let
|
||||
configDirName = {
|
||||
"vscode" = "Code";
|
||||
"vscode-insiders" = "Code - Insiders";
|
||||
"vscodium" = "VSCodium";
|
||||
}.${programs.vscode.package.pname};
|
||||
configPath =
|
||||
"${config.xdg.configHome}/${configDirName}/User/settings.json";
|
||||
in {
|
||||
after = [ "writeBoundary" ];
|
||||
before = [ ];
|
||||
data = ''
|
||||
install -m 0640 "$(readlink ${configPath})" ${configPath}
|
||||
'';
|
||||
};
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
@@ -10,6 +25,7 @@
|
||||
];
|
||||
"editor.mouseWheelZoom" = true;
|
||||
"files.autoSave" = "afterDelay";
|
||||
"clangd.path" = "/run/current-system/sw/bin/clangd";
|
||||
};
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
@@ -17,6 +33,8 @@
|
||||
myriad-dreamin.tinymist
|
||||
#tomoki1207.pdf latex-workshop is faster to preview pdf
|
||||
james-yu.latex-workshop
|
||||
twxs.cmake
|
||||
llvm-vs-code-extensions.vscode-clangd
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,6 +3,13 @@ let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
isPc = osConfig.networking.hostName == "kop-pc";
|
||||
isLaptop = osConfig.networking.hostName == "nix-laptop";
|
||||
restartPortals = pkgs.writeShellScript "restart-portals" ''
|
||||
#!/usr/bin/env bash
|
||||
systemctl --user restart xdg-desktop-portal-gtk
|
||||
systemctl --user restart xdg-desktop-portal-hyprland
|
||||
sleep 4
|
||||
systemctl --user restart xdg-desktop-portal
|
||||
'';
|
||||
in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
@@ -290,9 +297,10 @@ in {
|
||||
] ++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
"[workspace 9 silent] discord"
|
||||
"[workspace 9 silent] discordcanary"
|
||||
"[workspace 10 silent] firefox"
|
||||
"[workspace 10 silent] floorp"
|
||||
] ++ [
|
||||
"sleep 3 && ${pkgs.waybar}/bin/waybar &"
|
||||
"${restartPortals}"
|
||||
];
|
||||
};
|
||||
extraConfig = let
|
||||
|
||||
@@ -8,7 +8,12 @@ in {
|
||||
hyprlock.enable = false;
|
||||
hyprland.enable = false;
|
||||
waybar.enable = false;
|
||||
gtk.flatpakSupport.enable = true; #edits ~/.themes/adw-gtk3
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.env = lib.mkIf osConfig.custom.graphical.hyprland.enable [
|
||||
"GTK_THEME,adw-gtk3"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user