I would begin by parsing the nftables file (including comments in some way) and verifying that it can be output in an equally (or more) readable way as the parsed file. Then I'd create the UI and editing on top of that.
Generalised:
Abstract the things you wish to interact with
Build a UI on top of that abstraction
Edit: Looked into your post history. If you are aiming for a whole linux-based router setup you can send me some DMs, I have that set-up on my linux server right now (nftables, dnsmasq, systemd-networkd).
Yeah, the networking parts are a bit clunky still. I've fought systemd's resolver a few times and have to use NetworkManager to get my wifi working consistently.
I use Arch at work precisely because work requires me to install very specific corporate applications. Nearly every application I've needed exists in AUR, if it doesn't I can add it to AUR to get it to mesh well with my system.
Don't underestimate the relief of not needing to poke around with additional PPAs for ubuntu/debian that may or may not break my system next "version", not to mention manually installing .deb packages deep down knowing that it will never be updated again. Just 'paru slack' and you are ready.
I have had Arch on my work computer for 2 years now without breakages. Just keep an arch-usb nearby in case something goes wrong. Most things day-to-day are easier due to arch having excellent package availability through AUR, the things that are less easy are due to Wayland not being entirely supported.
If I didn't have different sudo configs on my laptop vs. server I'd have done stuff like this way too often. When I get an unexpected password prompt for a sudo command I know I was saved again, about a weekly occurrence
I started modifying/minimising my system too much for any other distro to be stable with it, often breaking my setup and causing instability. In the vein of minimalism I tried out arch, and since it works better AND has documentation on how to fix any issues I have found no reason to change.
For reference, setting this up with luks I would have a single partition on /dev/sda, /dev/sda1, and run:
cryptsetup luksFormat /dev/sda1
This formats the partition into luks and sets the password, everything stored in that same partition.
It is then ready for mounting with cryptdevice=UUID= [output from cryptsetup luksUUID /dev/sda1]:cryptlvm
Alright. So you are using two distinct physical drives for the encrypted data and the key to unlock it.
The simplest solution along this line would be to not address them by path and instead use UUIDs, partition UUIDs or IDs. I think cryptsetup creates UUIDs for both data and key partitions, and I think partition UUID creation is inevitable.
But moreover I have to ask, why aren't you using LUKS? It allows storing the key (password encrypted) with the main partition, simplifying this a fair deal.
For my laptops I use full disk encryption on root and keep my boot partitions on micro-SD cards that I always keep with me. This protects me from the "Evil maid attack" as well as secure boot does, without needing as much configuration or trust in UEFI.
Easiest solution would be to set up ssh keys and configure sudo to not require password for that specific command, I don't know how to send in the password in a correct manner.
It reduces the complexity of maintaining a system with 6 different web-applications, since it prevents cross-dependencies that may break the setup or complicate restoring backups of one application.
It is also quite handy to be able to get a fully packaged server with all dependencies handled internally.
Not really an option. I have the full setup with sonar, ombi etc. in the same docker-compose. Everything set up so with the relevant data is in one dir, so I can snapshot, recover or migrate easily. Would take far too much work to set up all of that native in a modular manner.
I would begin by parsing the nftables file (including comments in some way) and verifying that it can be output in an equally (or more) readable way as the parsed file. Then I'd create the UI and editing on top of that.
Generalised:
Edit: Looked into your post history. If you are aiming for a whole linux-based router setup you can send me some DMs, I have that set-up on my linux server right now (nftables, dnsmasq, systemd-networkd).
Actually didn't know about systemctl edit, I always write override files in /etc/systemd/system. Thanks for the tip!
Yeah, the networking parts are a bit clunky still. I've fought systemd's resolver a few times and have to use NetworkManager to get my wifi working consistently.
That sounds pretty monstrous... I update (and shut down) every day before going home.
I use Arch at work precisely because work requires me to install very specific corporate applications. Nearly every application I've needed exists in AUR, if it doesn't I can add it to AUR to get it to mesh well with my system.
Don't underestimate the relief of not needing to poke around with additional PPAs for ubuntu/debian that may or may not break my system next "version", not to mention manually installing .deb packages deep down knowing that it will never be updated again. Just 'paru slack' and you are ready.
I have had Arch on my work computer for 2 years now without breakages. Just keep an arch-usb nearby in case something goes wrong. Most things day-to-day are easier due to arch having excellent package availability through AUR, the things that are less easy are due to Wayland not being entirely supported.
The bash looks about correct, yes, but I am sure testing and research on your own will take you the rest of the way to a solution.
echo $VAR | grep <regex>check grep manpages to see what it returns when matching or not and how to silence output. And use an online regex tester to make a suitable regex
If I didn't have different sudo configs on my laptop vs. server I'd have done stuff like this way too often. When I get an unexpected password prompt for a sudo command I know I was saved again, about a weekly occurrence
cli and midnight commander. Usually only mc when the filenames are bothersome or when opening archive files.
I started modifying/minimising my system too much for any other distro to be stable with it, often breaking my setup and causing instability. In the vein of minimalism I tried out arch, and since it works better AND has documentation on how to fix any issues I have found no reason to change.
Fair enough. Best of luck in finding your own way of doing things, that is what arch is all about imo.
For reference, setting this up with luks I would have a single partition on /dev/sda, /dev/sda1, and run:
This formats the partition into luks and sets the password, everything stored in that same partition. It is then ready for mounting with cryptdevice=UUID= [output from cryptsetup luksUUID /dev/sda1]:cryptlvm
Alright. So you are using two distinct physical drives for the encrypted data and the key to unlock it.
The simplest solution along this line would be to not address them by path and instead use UUIDs, partition UUIDs or IDs. I think cryptsetup creates UUIDs for both data and key partitions, and I think partition UUID creation is inevitable.
But moreover I have to ask, why aren't you using LUKS? It allows storing the key (password encrypted) with the main partition, simplifying this a fair deal.
First and foremost, do you mean the punctuation character colon? That aside, please inform me of the cryptsetup commands you used to set it up.
For my laptops I use full disk encryption on root and keep my boot partitions on micro-SD cards that I always keep with me. This protects me from the "Evil maid attack" as well as secure boot does, without needing as much configuration or trust in UEFI.
OR, use modern ED! https://github.com/sidju/hired Syntax highlighting, command history and replaceable backend.
Word of advice, don't use default emacs keybindings. They gave me wrist pain...
Around 10, but that is mostly from helping others a lot.
Easiest solution would be to set up ssh keys and configure sudo to not require password for that specific command, I don't know how to send in the password in a correct manner.
It reduces the complexity of maintaining a system with 6 different web-applications, since it prevents cross-dependencies that may break the setup or complicate restoring backups of one application.
It is also quite handy to be able to get a fully packaged server with all dependencies handled internally.
Not really an option. I have the full setup with sonar, ombi etc. in the same docker-compose. Everything set up so with the relevant data is in one dir, so I can snapshot, recover or migrate easily. Would take far too much work to set up all of that native in a modular manner.
I run dockerised Jellyfin through docker-compose. I very much recommend it.
My dream is to have a proper rs-232 terminal for my server(s). Maybe set up some multiplexing arduino in between to run it for all my servers.
I always bake together boot and EFI, since you barely have any data on it otherwise. (Only if I have UEFI, of course)
Definitely this. Crashes in so many unrelated places is most likely hardware.