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

@ -4,59 +4,10 @@
pkgs,
...
}:
let
agentProfile = pkgs.writeText "agent.profile" ''
whitelist /nix/store
whitelist /nix/var
read-only /nix/store
whitelist ''${HOME}/.cache/nix
whitelist ''${HOME}/.local/state/nix
whitelist /etc/nix
whitelist /etc/nixos
whitelist /nix/var/nix/daemon-socket
whitelist ''${HOME}/dev
whitelist ''${HOME}/work
whitelist ''${HOME}/.config
blacklist ''${HOME}
blacklist /etc/nixos/secrets
blacklist /etc/shadow
blacklist /etc/sudoers
blacklist /etc/sudoers.d
blacklist /root
caps.drop all
nonewprivs
noroot
seccomp
no3d
nodvd
notv
nou2f
novideo
ignore net none
machine-id
disable-mnt
private-dev
private-tmp
private-cache
'';
in
{
programs.firejail = {
enable = true;
wrappedBinaries = {
claude = {
executable = "${pkgs.claude-code}/bin/claude";
profile = agentProfile;
extraArgs = [
"--private=~/.local/state/claude-home"
];
};
chromium-sandbox = {
executable = "${pkgs.chromium}/bin/chromium";
profile = "${pkgs.firejail}/etc/firejail/chromium-browser.profile";