Remove the nm-tray module

This commit is contained in:
SebastianStork 2024-04-21 22:00:54 +02:00
parent e9240076e2
commit d56f0ad920
2 changed files with 20 additions and 50 deletions

View file

@ -6,15 +6,9 @@
}: let }: let
cfg = config.myConfig.de; cfg = config.myConfig.de;
in { in {
options.myConfig.de = { options.myConfig.de.tray.syncthing.enable = lib.mkEnableOption "";
tray = {
syncthing.enable = lib.mkEnableOption "";
networkmanager.enable = lib.mkEnableOption "";
};
};
config = lib.mkMerge [ config = lib.mkIf cfg.tray.syncthing.enable {
(lib.mkIf cfg.tray.syncthing.enable {
home.packages = [pkgs.syncthingtray-minimal]; home.packages = [pkgs.syncthingtray-minimal];
systemd.user.services = { systemd.user.services = {
@ -32,26 +26,5 @@ in {
Install.WantedBy = ["graphical-session.target"]; Install.WantedBy = ["graphical-session.target"];
}; };
}; };
})
(lib.mkIf cfg.tray.networkmanager.enable {
home.packages = [pkgs.networkmanagerapplet];
systemd.user.services = {
nm-applet = {
Unit = {
Description = "Networkmanager-applet";
Requires = ["tray.target"];
After = [
"graphical-session-pre.target"
"tray.target"
];
PartOf = ["graphical-session.target"];
}; };
Service.ExecStart = "${lib.getExe pkgs.networkmanagerapplet}";
Install.WantedBy = ["graphical-session.target"];
};
};
})
];
} }

View file

@ -11,10 +11,7 @@
wallpaper = ./wallpaper; wallpaper = ./wallpaper;
theming.enable = true; theming.enable = true;
tray = { tray.syncthing.enable = osConfig.myConfig.syncthing.enable;
syncthing.enable = osConfig.myConfig.syncthing.enable;
networkmanager.enable = osConfig.networking.networkmanager.enable;
};
}; };
shell = { shell = {