ruffsl

joined 2 years ago
[–] ruffsl@programming.dev 6 points 1 day ago

Appreciate the detailed context, and thank you for your work!

[–] ruffsl@programming.dev 1 points 4 days ago

The comment thread sparked a few new questions for me.

That will likely soon stop working because steam-run is no longer a grab bag for literally every library out there.

What recently changed with steam-run?

Is using pkgs.appimageTools.defaultFhsEnvArgs with pkgs.buildFHSUserEnv a suitable alternative?

   #!/usr/bin/env nix-shell

   { pkgs ? import <nixpkgs> { } }:

  (
    let base = pkgs.appimageTools.defaultFhsEnvArgs; in
    pkgs.buildFHSUserEnv (base // {
      name = "FHS";
      targetPkgs = pkgs: (with pkgs; [
        /* add additional packages here e.g */
        pcre
        tzdata
      ]);
      runScript = "bash";
      extraOutputsToInstall = [ "dev" ];
    })
  ).env
 

Fair criticism, although the larger discussion thread this garnered earlier this year was an interesting read. Over +300 comments:

[–] ruffsl@programming.dev 4 points 1 week ago (1 children)

I'm basically deep into my learning phase of nix, and whenever I find something worthwhile, I like cross posting to read what others may think. It's also a handy means of "bookmarking", recalling what authors I've found so far and when I personally discovered them. Glad you appreciate the current deluge of posts.

[–] ruffsl@programming.dev 1 points 1 week ago

That's a good one. Definitely seems selecting substituters closer to runtime is more flexible. Especially when the system may be roaming across networks like a laptop that may move outside your home LAN that links to your local desktop cache.

[–] ruffsl@programming.dev 1 points 1 week ago

Check out the nix config repo from Unmoved Centre:

 
[–] ruffsl@programming.dev 5 points 1 week ago

It's a great video, and I hope the author is able to publish more nix content like this again soon. We'll just have to watch their blog's RSS feed in the meantime.

 

cross-posted from: https://programming.dev/post/36980791

This is a quick and painless tutorial on how to install and configure NixOS from Scratch. It involves starting off with Home manager and Flakes before even rebuilding your system.

I thought the example using builtins.mapAttrs with create_symlink for xdg.configFile was cleverly simple.

 

This is a quick and painless tutorial on how to install and configure NixOS from Scratch. It involves starting off with Home manager and Flakes before even rebuilding your system.

I thought the example using builtins.mapAttrs with create_symlink for xdg.configFile was cleverly simple.

[–] ruffsl@programming.dev 2 points 1 week ago

Hello Patrick! Thanks for the writeup; gradually incorporating it into my config.

BTW, I recall reading a PR you started on fixing the fallback from failing substituters? This may be of interest to you:

 

cross-posted from: https://programming.dev/post/36875851

As a developer I often need to run code I cannot trust, especially dependencies from NodeJS and Python projects, on my dev machine. In order to protect my system from potentially malicious code, I built NixWrap, an adhoc sandboxing tool for NixOS.

NixWrap wraps bubblewrap (oh dear), running it with convenient defaults and offering easy to use command line flags to toggle custom options. An invocation to NixWrap is typically way shorter than the bubblewrap equivalent.

E.g. npm install can be wrapped with wrap -n npm install to gain network access and write access to the current working directory.

 

As a developer I often need to run code I cannot trust, especially dependencies from NodeJS and Python projects, on my dev machine. In order to protect my system from potentially malicious code, I built NixWrap, an adhoc sandboxing tool for NixOS.

NixWrap wraps bubblewrap (oh dear), running it with convenient defaults and offering easy to use command line flags to toggle custom options. An invocation to NixWrap is typically way shorter than the bubblewrap equivalent.

E.g. npm install can be wrapped with wrap -n npm install to gain network access and write access to the current working directory.

[–] ruffsl@programming.dev 3 points 1 week ago (1 children)

That is a bizarre looking error. What architecture is your host system? Is your config repo publicly viewable? Installing tail scale is your only build issue?

[–] ruffsl@programming.dev 2 points 1 week ago (1 children)

Only not by itself, no? Couldn't it be combined with any of those X11 server apps for hosting a display socket over the local loop back?

[–] ruffsl@programming.dev 3 points 2 weeks ago

Whoops, I misread scheme as schema. That's really powerful. One thing I wish I could reliably do with a Nix LSP is navigate to a definition of a symbol.

[–] ruffsl@programming.dev 2 points 2 weeks ago

Still seems a little too idealistic, not sure how this would really shake down with more complex build systems or multilingual projects.

view more: next ›