fix(desktop: make sure tailscale works at hyprland launch
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-07-10 17:33:09 -04:00
parent 13abafb1b2
commit fdea25896e

View file

@ -6,17 +6,34 @@
self,
...
}: let
inherit (lib) makeLibraryPath mkIf optionalString;
inherit (lib) getExe makeLibraryPath mkIf optionals optionalString;
inherit (pkgs.writers) writeTOML;
flakeDir = config.environment.variables.FLAKE;
cfg = config.roles.desktop;
nvidiaEnable = config.nvidia.enable;
restartTailscale = pkgs.writeShellScriptBin "restartTailscale" ''
sudo ${pkgs.systemd}/bin/systemctl restart tailscaled.service
'';
in {
imports = [./dolphin.nix];
programs.kdeconnect.enable = true;
security.sudo.extraRules = [
{
users = [cfg.user];
groups = [100];
commands = [
{
command = "${pkgs.systemd}/bin/systemctl restart tailscaled.service";
options = ["SETENV" "NOPASSWD"];
}
];
}
];
home-manager.users.${cfg.user} = {
imports = [
./home/foot.nix
@ -182,17 +199,21 @@ in {
wayland.windowManager.hyprland = {
settings = {
exec-once = [
"${config.programs.kdeconnect.package}/libexec/kdeconnectd"
"kdeconnect-indicator"
exec-once =
[
"${config.programs.kdeconnect.package}/libexec/kdeconnectd"
"kdeconnect-indicator"
"wl-paste --watch cliphist store"
"wl-paste --watch cliphist store"
"sleep 3; nextcloud --background"
"sleep 3; nextcloud --background"
"[workspace special:protonmail silent] proton-mail"
"[workspace special:spot silent] spotify"
];
"[workspace special:protonmail silent] proton-mail"
"[workspace special:spot silent] spotify"
]
++ optionals config.services.tailscale.enable [
"sleep 3; ${getExe restartTailscale}"
];
windowrule = [
"tile,^(libreoffice)$"