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,
|
||||
...
|
||||
}: {
|
||||
home.packages = [
|
||||
(pkgs.tailscale.overrideAttrs (old: {
|
||||
postInstall =
|
||||
old.postInstall
|
||||
+ ''
|
||||
cp -r $out/lib $out/etc
|
||||
'';
|
||||
}))
|
||||
imports = [
|
||||
../modules/home/tailscale.nix
|
||||
];
|
||||
services.tailscale.enable = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user