4
submitted 2 weeks ago by mawkler@lemmy.ml to c/nixos@lemmy.ml

I regularly end up on the unofficial NixOS wiki (https://nixos.wiki/) instead of the official one (https://wiki.nixos.org/) when doing web searches. Today I to proomted out this little bookmarklet that takes me from the unofficial to the official one:

javascript:(function(){window.location.href=window.location.href.replace('nixos.wiki','wiki.nixos.org');})()

A bookmarklet is a web browser bookmark that runs JavaScript instead of navigating you to a website. To use it, create a new bookmark in your web browser and paste the snippet above into the URL field. whenever you click the bookmark it will run the code.

Btw, I was trying to find a way to set something up that does this forwarding automatically for me but couldn't find one that doesn't involve installing a browser extension. If anyone knows how to do it "natively", please let me know.

14
submitted 3 weeks ago* (last edited 3 weeks ago) by mawkler@lemmy.ml to c/sweden@lemmy.world

Jag bad precis en tantgranne på altanen bredvid att sluta röka och det gick verkligen inte att få henne att förstå. Min 1 år gamla dotter vill leka på altanen, men grannen sitter och kedjeröker hela dagarna. Jag var saklig och vädjande men det var som att prata med en barnslig vägg.

"Din dotter kanske inte ska vara på altanen då"

"Det finns så mycket som är farligt i världen"

"Andra grannar röker ju också"

"Det är inte olagligt"

"Gå härifrån"

Efter ett tag blev hennes gubbe hotfull mot mig och då gick jag.

Har försökt prata med hyresvärden, men de tänker inte göra någonting. Vad mer kan jag ens göra? Jag är så rasande och frustrerad just nu.

13
submitted 1 month ago by mawkler@lemmy.ml to c/nix@programming.dev

Sorry if this is an ignorant question. I love Nix, but as a user it feels absurd that changing an option from true to false in a home-manager managed config file that then gets transpiled from Nix to TOML, for instance, takes like 10 seconds on a decently modern machine.

In my world that kind of transpilation should be instant. I get that there's more happening behind the scenes than just doing Nix -> TOML, but still. Imagine if the transpilation of config files were instant, so you could have home-manager automagically do the transpilation every time you save the file. That would be awesome, especially for programs that support hot-reloading like Hyprland or Niri.

Is this a Nix issue or a home-manager issue? How much of speedup would it yield to rewrite Nix and/or home-manager in a faster language like Zig or Rust?

28
submitted 1 month ago by mawkler@lemmy.ml to c/nix@programming.dev

I'll start. I just discovered this one. It shows asterisks (*********) while you type your sudo password:

security.sudo.extraConfig = # sh
  ''
    Defaults pwfeedback # Make typed password visible as asterisks
  '';
-4
submitted 2 months ago by mawkler@lemmy.ml to c/nix@programming.dev

Skills are basically markdown documents providing documentation/instructions for LLMs.

As an example, I would like to have a "Nix/NixOS skill" available to opencode when I'm in my NixOS configuration directory. For example one from agentskills.io . What's the best way to install that with Nix?

There seem to be some non-Nix tools for doing this, like skills.

I did some searching online but I couldn't find a simple solution to this.

10
submitted 3 months ago by mawkler@lemmy.ml to c/nix@programming.dev

I've always hated the fact that Nix silently ignores any file that's not tracked by Git. Partly because I always forget this and have to re-build every time that I add a new file. But also the fact that Nix is coupled to VCS.

jj is a new VCS that wraps git. jj has a slightly different (improved) workflow, and doesn't have a staging area. What this means for Nix is that whenever I create a new file I have to run jj status (the equivalent to git status) before I can build with Nix, which feels incredibly silly to me.

Thanks for coming to my Ted talk.

11
submitted 4 months ago by mawkler@lemmy.ml to c/rust@lemmy.ml

So I ran cargo audit on a project and got the following output:

error: 4 vulnerabilities found!
warning: 8 allowed warnings found

What do I do to fix these errors? The vulnerabilities are in dependencies of my dependencies, and they seem to be using an older version of a package. Is my only option to upgrade my own dependencies (which would take a non-trivial amount of work), or is there any way to tell my dependencies to use a newer version of those vulnerable packages like how npm audit fix works? I'm guessing that's what cargo audit fix is supposed to do, but in my case it wasn't able to fix any of the vulnerabilities.

I tried searching the web, but there was surprisingly little information on this stuff.

6
submitted 6 months ago by mawkler@lemmy.ml to c/nix@programming.dev
7
submitted 1 year ago by mawkler@lemmy.ml to c/neovim@programming.dev

Hi! I built this small plugin that adds JSX/TSX text-objects and motions using Treesitter: jsx-element.nvim. I was surprised that it (to my knowledge) doesn't exist yet.

From the README:

Use ]t/[t to go to the next/previous JSX/TSX element.

Use it/at to use JSX/TSX elements as text-objects. For example dit for "delete inside tag". This works with self-closing elements:

<Checkbox value="checkedA" />
          ╰───── it ─────╯
╰─────────── at ────────────╯

It also works with paired elements:

<Button variant="text">This is a button</Button>
                       ╰───── it ─────╯
╰───────────────────── at ─────────────────────╯
18
submitted 1 year ago by mawkler@lemmy.ml to c/neovim@programming.dev

I've been using Neovim for about eight years, but I knever knew about :help o_CTRL-V until today. It lets you perform a command over a column.

I had the code below and wanted to remove all trailing colons:

foo:
bar:
baz:
faz:

What I meant to do was to do was (with the cursor on the first line) $<C-v>3jd to visually select all colons and then delete them. But I accidentally did $d<C-v>3j, which, to my surprise, did the same thing.

I did know about :help o_V, which lets you turn a characterwise operation like di{ into a line-wise one by doing dVi{. But it never occurred to me that I could do the same thing with <C-v>.

21
submitted 2 years ago by mawkler@lemmy.ml to c/neovim@programming.dev

By default in Neovim, H/M/L jump to the highest, middle, and lowest line in the current visible window. If you have scrolloff set, it can be dificult to tell exactly which lines they correspond to. I made this plugin to visually guide you.

368
submitted 2 years ago by mawkler@lemmy.ml to c/neovim@programming.dev

I posted about this on Reddit a year ago, and I figured write about it again:

Like most companies, the one I work for will happilly pay for any employee's license to a proprietary IDE without batting an eye. Therefore, I argued that I should be able to spend that budget on a donation to an open source tool that I use daily instead. After a lot of back and forth I finally got them to donate an amount that would correspond to what they would pay for a yearly subscription to a proprietary tool to Neovim.

Do you use Neovim at work? If so, I urge you to do the same thing! That way the core team can continue to deliver awesome new features to the editor we all love. Here's a link to where you can donate.

I now got my work to pay a $400 yearly "Neovim subscription" for the second time.

To those wondering how I did it, I basically just argued that since employees at my work have an allocated budget for buying proprietary tools, it makes sense if we could spend an equivalent amount on a FOSS alternative. That way the money spent would benefit us all, and since we use the tool to make money we have a responsibility to give back to the FOSS project.

There was a bit of a back-and forth for technical reasons because (at least in Sweden where I live), payments and donations are handled and regulated differently, but they finally made it work.

If you also use Neovim for work, I encourage you to do the same thing! That way the core team can continue to deliver awesome new features to the editor we all love. Here's a link to where you can donate. There's also the official merch store if you would like to support the project that way: https://store.neovim.io/.

[-] mawkler@lemmy.ml 45 points 2 years ago

attack the big corporations instead

That's the problem though. How do you even do that?

[-] mawkler@lemmy.ml 81 points 2 years ago

I'm not sure which is worse. I mean most desktop programs are just glorified web browsers anyway (i.e Electron)

[-] mawkler@lemmy.ml 6 points 2 years ago

That just sounds like literal greenwashing

[-] mawkler@lemmy.ml 10 points 2 years ago* (last edited 2 years ago)

Btw, is there any casting device/service available that's not spyware (i.e. AppleTV/Chromecast)?

[-] mawkler@lemmy.ml 19 points 3 years ago

Why are schools pushing so hard for enslaved Linux laptops?

[-] mawkler@lemmy.ml 37 points 3 years ago

New study shows that the floor is made out of floor

[-] mawkler@lemmy.ml 8 points 3 years ago* (last edited 3 years ago)

The term "Foo Fighters" originally comes from UFO sightings by the U.S. military during WW2: https://en.wikipedia.org/wiki/Foo fighter

[-] mawkler@lemmy.ml 19 points 3 years ago

Neovim is awesome

[-] mawkler@lemmy.ml 10 points 3 years ago

"You will own nothing and be happy"

[-] mawkler@lemmy.ml 40 points 3 years ago

These aren't "old person traits". It's common sense.

[-] mawkler@lemmy.ml 6 points 3 years ago

AUR is amazing

view more: next ›

mawkler

0 post score
0 comment score
joined 3 years ago