mirror of
https://github.com/callumio/nixfiles.git
synced 2025-12-17 03:29:20 +00:00
parent
c51660e3f0
commit
37b26d1f17
12 changed files with 270 additions and 234 deletions
|
|
@ -25,9 +25,9 @@ let
|
|||
./tailscale.nix
|
||||
./secret.nix
|
||||
];
|
||||
homeManagerModules = exportModules [
|
||||
./trayscale.nix
|
||||
];
|
||||
homeManagerModules =
|
||||
exportModules [
|
||||
];
|
||||
sharedModules = with nixosModules; [
|
||||
pinentry-fix
|
||||
nix
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.trayscale;
|
||||
in {
|
||||
options.services.trayscale = {
|
||||
enable =
|
||||
mkEnableOption
|
||||
"An unofficial GUI wrapper around the Tailscale CLI client.";
|
||||
package = mkPackageOption pkgs "trayscale" {};
|
||||
hideWindow = mkOption {
|
||||
description = "Whether to hide the trayscale window on startup.";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
(hm.assertions.assertPlatform "services.trayscale" pkgs platforms.linux)
|
||||
];
|
||||
|
||||
systemd.user.services.trayscale = {
|
||||
Unit = {
|
||||
Description = "An unofficial GUI wrapper around the Tailscale CLI client";
|
||||
Requires = ["tray.target"];
|
||||
After = ["graphical-session-pre.target" "tray.target" "tailscaled.service"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install = {WantedBy = ["graphical-session.target"];};
|
||||
Service.ExecStart =
|
||||
toString (["${cfg.package}/bin/trayscale"]
|
||||
++ optional cfg.hideWindow "--hide-window");
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue