feat: Added tailscale steam deck module
This commit is contained in:
28
modules/home/tailscale.nix
Normal file
28
modules/home/tailscale.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.services.aichat;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
services.aichat = {
|
||||||
|
enable = mkEnableOption "aichat";
|
||||||
|
package = mkPackageOption pkgs "aichat" {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
home.packages = mkIf cfg.enable [cfg.package];
|
||||||
|
home.activation.runTailscaleActivation = let
|
||||||
|
tailscaleLib = "${cfg.package}/lib";
|
||||||
|
in
|
||||||
|
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
|
cp -r ${tailscaleLib} /etc/
|
||||||
|
systemctl reload-daemon
|
||||||
|
systemctl enable --now tailscaled
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,13 +3,8 @@
|
|||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = [
|
imports = [
|
||||||
(pkgs.tailscale.overrideAttrs (old: {
|
../modules/home/tailscale.nix
|
||||||
postInstall =
|
|
||||||
old.postInstall
|
|
||||||
+ ''
|
|
||||||
cp -r $out/lib $out/etc
|
|
||||||
'';
|
|
||||||
}))
|
|
||||||
];
|
];
|
||||||
|
services.tailscale.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user