tailscale and user groups

This commit is contained in:
root 2026-07-19 11:34:28 -03:00
parent 6447486643
commit f733a5238c
No known key found for this signature in database
7 changed files with 113 additions and 217 deletions

View file

@ -58,25 +58,38 @@
# "Xft.antialias" = 1;
# "Xft.rgba" = "rgb";
# };
systemd.user.services.waypipe-socket = {
systemd.user.services.screenshot-latest = {
Unit = {
Description = "start waypipe client";
After = [ "niri.service" ];
Requires = [ "niri.service" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
Description = "Update latest.png symlink";
};
Service = {
ExecStart = "${pkgs.waypipe}/bin/waypipe --socket /tmp/waypipe.sock client";
ExecStartPost = "${pkgs.acl}/bin/setfacl -m g:sandbox:rw /tmp/waypipe.sock";
ExecStopPost = "${pkgs.coreutils}/bin/rm /tmp/waypipe.sock";
RuntimeDirectory = "waypipe";
Type = "simple";
Restart = "on-failure";
Type = "oneshot";
ExecStart =
let
screenshotDir = "${config.home.homeDirectory}/pictures/screenshots";
script = pkgs.writeShellScript "screenshot-latest-update" ''
latest=$(${pkgs.coreutils}/bin/ls -t "${screenshotDir}"/*.png 2>/dev/null | head -1)
if [ -n "$latest" ]; then
${pkgs.coreutils}/bin/ln -sf "$latest" "${screenshotDir}/latest.png"
fi
'';
in
"${script}";
};
};
systemd.user.paths.screenshot-latest = {
Unit = {
Description = "Watch screenshot directory for new files";
};
Install = {
WantedBy = [ "default.target" ];
};
Path = {
PathChanged = "${config.home.homeDirectory}/pictures/screenshots";
};
};
sops.secrets."user/gpg/legacy_fnzr" = { };
home.activation.importGpgKey = config.lib.dag.entryAfter [ "writeBoundary" ] ''
if [[ -f "${config.sops.secrets."user/gpg/legacy_fnzr".path}" ]]; then
@ -258,7 +271,7 @@
};
programs = {
opencode.enable = true;
# opencode.enable = true;
dank-material-shell.enable = true;
ssh = {
enable = true;
@ -364,11 +377,13 @@
home.packages = with pkgs; [
xrdb
# (writeShellScriptBin "agent" ''
# machinectl shell agent@ ${waypipe}/bin/waypipe --socket /run/waypipe.sock server fish
# '')
(writeShellApplication {
name = "opencode-sandbox";
name = "claude-code";
runtimeInputs = [ openssh ];
text = builtins.readFile ../executables/claude-code.sh;
})
(writeShellApplication {
name = "opencode";
runtimeInputs = [ openssh ];
text = builtins.readFile ../executables/opencode.sh;
})