fix(desktop: make sure tailscale works at hyprland launch
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
13abafb1b2
commit
fdea25896e
1 changed files with 30 additions and 9 deletions
|
@ -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,7 +199,8 @@ in {
|
|||
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
exec-once = [
|
||||
exec-once =
|
||||
[
|
||||
"${config.programs.kdeconnect.package}/libexec/kdeconnectd"
|
||||
"kdeconnect-indicator"
|
||||
|
||||
|
@ -192,6 +210,9 @@ in {
|
|||
|
||||
"[workspace special:protonmail silent] proton-mail"
|
||||
"[workspace special:spot silent] spotify"
|
||||
]
|
||||
++ optionals config.services.tailscale.enable [
|
||||
"sleep 3; ${getExe restartTailscale}"
|
||||
];
|
||||
|
||||
windowrule = [
|
||||
|
|
Loading…
Reference in a new issue