ABC_AlwaysBeCoding

u/ABC_AlwaysBeCoding


r/NixOS•

What do you guys do for this? Most of the tooling out there to examine processes on Linux seems to assume short path names to binary executables, but as we know, Nix does not have that. I wrote the following function, which has helped me filter down a process list to anything I need to see (by also letting me scroll right as far as I need to), but things like the "Command" column in btop++ are essentially useless due to the commonly long NixOS pathnames.

Are there any tools you folks use to get better visibility on processes on NixOS?

list-procs() {
  PS_PERSONALITY=linux ps -ewwo pid,%cpu,%mem,nice,pri,rtprio,args --sort=-pcpu,-pid | awk -v filter="$1" 'NR==1 || tolower($0) ~ to
119


r/linux_gaming•

I run Steam via flatpak on NixOS and sometimes, things don't exit properly/cleanly. This causes me to either have to logout, reboot, or manually kill all the PIDs that Steam fires up to make Proton work on Linux, which is a pain. So today I wrote a bash function that does this for me. So far, this has saved me lots of time. Comments/criticisms welcome (either here or on the gist itself!).

ChatGPT4 provided the comments explaining how it works, as well as assisting me with building the functionality out a lot faster than it would have taken me via trial-and-error and reading docs. Unix pipelines really shine with stuff like this (as do the latest LLM's).

Possible enhancements: 1) make it

02


r/bash•

It always bothered me that every example of altering colon-separated values in an environment variable such as PATH or LD_LIBRARY_PATH (usually by prepending a new value) wouldn't bother to check if it was already in there and delete it if so, leading to garbage entries and violating idempotency (in other words, re-running the same command WOULD NOT result in the same value, it would duplicate the entry). So I present to you, prepend_path:

# function to prepend paths in an idempotent way
prepend_path() {
  function docs() {
    echo "Usage: prepend_path [-o|-h|--help] <path_to_prepend> [name_of_path_var]" >&2
    echo "Setting -o will print the new path to stdout i
836

r/NixOS•

The only thing I've gotten to work via Bottles is a Flash runner for some old Flash content.

Every single attempt I make to run any Blizzard game fails, though. I've followed all the guides, but all of them use other distros such as Arch.

I see now that there's a "Bottles-unwrapped" on search.nixos.org for more recent versions of NixOS but I honestly don't fully understand what the difference between wrapped and unwrapped packages is yet.

315

r/FallenOrder•

... with all the portals. Vwoop vwoop vwoop vwoop.

Gaddamn, that was amazing. (Once I figured out what they looked like when they were faint in midair, LOL)

1.1K176

r/daddit•

Honest/serious question. I know it's illegal to discriminate but no one's going to be able to make a case if someone simply doesn't call me back after they learn I have a young kid at home.

I used to work at tech startups and I'm now looking at big corporate jobs because that seems to be the space you gotta go if you have a kid. (I'm fine with it, have been at big companies before, but this is potentially a speedbump because I usually focus on more bleeding-edge tech, and those spaces... do not. That also might mean I could be uniquely positioned to help them... but without having built the clout to do so. LOL)

It's been taking much longer than expected to find something (yeah, it's tumult

1183


r/bash•

I've been learning Nix and as an application for a job (yes, still looking for work) I wrote a single-file Bash app that provided a TUI to look up food truck eateries (downloaded and cached from an online source CSV) based on a filter and sort by distance from you. To make this work I needed to rely on a few external binaries- the right versions of bash, GNU awk, jq, curl, csvquote and this neat thing called gum. I finished it but in the course of testing it I realized that I got it running fine on Linux (NixOS) but it acted a bit wonky on macOS (and since I was actually applying for a primarily Elixir-lang job, I knew most devs would be on

219

r/NixOS•

i.e., https://nix.dev/tutorials/reproducible-scripts

but with flakes and not traditional Nix.

I have some Bash stuff that I want to preserve.

Also, if there was a way to do it the Nix way but only if Nix was installed, that would be sweet, too.

EDIT: I ended up doing it this way; adapt to your own needs, but this seems to work well for now while not requiring any other files:

https://gist.github.com/pmarreck/18a27a2af8688bef2f51992763ded238

1540

r/NixOS•

So for example, it would have flake.nix files for a "standard" C/C++ project, one for a "standard" Rust project, one for a "standard" Node project, a "standard" Python project (that might use virtualenv etc.), a "standard" Python with ML, a "standard" Elixir project, an Elixir project with Phoenix, etc. etc.

You could also have variants for various use-cases.

I have a few of these floating around locally but it's incomplete.

Just something to start with and drop in via nix develop when you're cloning projects that don't have a flake.nix file yet and you want to just get up and running to try them.

Might something like this be useful for Nix noobs (and possibly advanced folks)?

114

r/NixOS•

Is this possible? I applied a theme in my configuration.nix (Nordic) but even after reboot it seems to only apply to a few apps, like my Firefox Nightly, and not things like the Gnome file browser or my Wezterm window.

I run xorg on nvidia, if it matters

14

r/ADHD•

I was an independent dev last year with income from various sources and I literally have to pore over 12 months of bank and credit card paperwork and make a spreadsheet itemizing everything to find all deductions and expenses JUST to get my tax papers in order for my accountant.

I've done this in previous years, but this year feels especially hard for some reason (possibly because I now have a toddler, and because I feel like a failure since my business isn't making enough money to support me)

I'm hoping to go back to W-2-land this year and part of the joy will be highly simplified tax filing.

How do you guys get through a mountain of paperwork you have to do?

Regarding my last "aside" q

12