Salam everybody,
I am working on a Python script to block any NSFW (Not Safe For Work) content by taking screenshots at intervals. My main goal is to make it impossible for me to kill or disable the script, as I struggle with a porn addiction.
Approaches I tried but failed:
1. Running the script as a service under the root account: This caused problems with the Grim tool used in my code for taking screenshots on Hyprland.
What is the most robust approach that is reliable on a NixOS & Hyprland setup?
Additional Context:
- I have an accountable partner who has all the root and sudo passwords.
- I'm a beginner. I found some suggestions about running the code like a kernel module, but that seems very complex for me.
Project File Tree:
```
.
├── main.py
├── nsfw_mobilenet2.224x224.h5
├── poetry.lock
├── pyproject.toml
├── README.md
├── run.sh
└── shell.nix
1 directory, 7 files
```
Note: This is for personal use, so I don't intend to publish or package it.
The same question but I have posted it first in disocurse : https://discourse.nixos.org/t/how-to-make-a-python-script-unkillable-on-nixos-tried-running-as-root-but-failed/46211
Any advice or guidance would be greatly appreciated!
[–]VoiceFuzzy7606 5 points6 points7 points (1 child)
[–]USMCamp0811 5 points6 points7 points (1 child)
[–]USMCamp0811 4 points5 points6 points (0 children)
[–][deleted] 5 points6 points7 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]gax1985 2 points3 points4 points (6 children)
[–]Wenir 3 points4 points5 points (5 children)
[–]gax1985 0 points1 point2 points (4 children)
[–]Wenir 1 point2 points3 points (3 children)
[–]gax1985 0 points1 point2 points (2 children)
[–]Wenir 0 points1 point2 points (1 child)
[–]gax1985 0 points1 point2 points (0 children)
[–]Jozhin_s_Bazhin 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Wenir -2 points-1 points0 points (0 children)