hallettj

joined 2 years ago
[–] hallettj 1 points 9 months ago

For the PaperWM fans, this is a dedicated WM based on the same idea

[–] hallettj 8 points 9 months ago

This is basically the plot of Loki

[–] hallettj 4 points 9 months ago (1 children)

AFAIK the best thing you can do to improve your coffee-freezing process is to prevent moisture from getting into the beans when you thaw. If you let it, moisture from the air will condense on the cold beans. So keep the beans in a closed, airtight container until they come to room temperature. (Airtight because water vapor is air.) So yeah, jars are good for this. Or sealed freezer bags should work too.

[–] hallettj 4 points 9 months ago

Pseudoflowers?? That sounds like quite an elaborate adaptation! I suppose that's to co-opt pollinators to spread spores?

[–] hallettj 3 points 9 months ago

I haven't used Krita. But I can tell you that those wrappers are "options" defined by NixOS modules. There is documentation for writing them in the NixOS Manual.

Built-in NixOS options are documented in the Configuration Options Appendix with links to implementations which provide helpful examples when writing your own options.

[–] hallettj 2 points 10 months ago

Hmm, good point. But it was Ursula Le Guin who coined the word. Maybe there's a workable reference in Left Hand of Darkness, or The Dispossessed.

[–] hallettj 4 points 10 months ago

Well ok, they both use symlinks but in different ways. I think what I was trying to say is that in NixOS it's symlinks all the way down.

IIUC on Fedora Atomic you have an ostree image, and some directories in the image are actually symlinks to the mutable filesystem on /var. Files that are not symlinks to /var (and that are not inside those symlinked directories), are hard links to files in the ostree object store. (Basically like checked-out files in a git repository?)

On NixOS this is what happens if examine what's in my path:

$ which curl
/run/current-system/sw/bin/curl

$ ls -l /run | grep current-system
/run/current-system -> /nix/store/p92xzjwwykjj1ak0q6lcq7pr9psjzf6w-nixos-system-yu-23.11.20231231.32f6357

$ ls -l /run/current-system/sw/bin/curl
/run/current-system/sw/bin/curl -> /nix/store/r304lglsa9i2jy5hpbdz48z3j3x2n4a6-curl-8.4.0-bin/bin/curl

If I select a previous configuration when I boot I would get a different symlink target for /run/current-system. And what makes updates atomic is the last step is to switch the /run/current-system symlink which switches over all installed packages at once.

I can temporarily load up the version of curl from NixOS Unstable in a shell and see a different result,

$ nix shell nixpkgs-unstable#curl  # this works because I added nixpkgs-unstable to my flake registry
$ which curl
/nix/store/0mjq6w6cx1k9907vxm0k5pk7pm1ifib3-curl-8.4.0-bin/bin/curl  # note the hash is different

I could have a different version curl installed in my user profile than the one installed system-wide. In that case I'd see this:

$ which curl
/home/jesse/.nix-profile/bin/curl

$ ls -la /home/jesse | grep .nix-profile
.nix-profile -> /nix/var/nix/profiles/per-user/jesse/profile

$ ls -l /nix/var/nix/profiles/per-user/jesse
profile -> profile-133-link
profile-130-link -> /nix/store/ylysfs90018zc9k0p0dg7x6wvzqcq68j-user-environment
profile-131-link -> /nix/store/9hjiznbaii7a8aa36i8zah4c0xcd8w6d-user-environment
profile-132-link -> /nix/store/h4kkw1m5q6zdhr6mlwr26n638vdbbm2c-user-environment
profile-133-link -> /nix/store/jgxhrhqiagvhd6g42d17h4jhfpgxsk3n-user-environment

Basically symlinks upon symlinks everywhere you look. (And environment variables.)

So I guess at the end everything is symlinks on NixOS, and everything is hard links plus a set of mount paths on Fedora Atomic.

[–] hallettj 7 points 10 months ago

If you put an FHS on the actual system you wouldn't be able to install multiple versions of the same package, updates wouldn't be atomic - you wouldn't get the big selling points of Nix.

[–] hallettj 3 points 10 months ago

When science kills the mystery, semantics keeps the debate alive!

[–] hallettj 4 points 10 months ago

To answer your other question, yes there are still single-cell organisms evolving into new species all the time, in the ocean and elsewhere. That includes new multi-cellular species evolving from single cells all the time. But it takes a long time to develop from cell, to clump of slime, to something with legs. So you might not notice the changes if you aren't super patient.

Or were those separate questions? Are you asking if chickens descended from single-cell organisms? Yes they did. With a lot of steps in between.

[–] hallettj 12 points 10 months ago (2 children)

"Atomic" is a catchy descriptor! Atomic distros for the Atomic Age! It could be an umbrella term since NixOS and Guix are atomic, but instead of images and partitions they use symlinks, and patch binaries to use full paths for libraries and programs that they reference. So there are image-based distros, and I guess expression-derived distros which are both atomic.

I haven't tried image-based distros. This post fills in some gaps for me. Thanks for the write-up!

4
submitted 1 year ago* (last edited 1 year ago) by hallettj to c/nixos@lemmy.ml
 

I'm trying to set up Lutris to play games with Wine. I don't understand how I am supposed to install wine runners? Can anyone help?

Edit:* It seems the answer is to install runners through the Lutris UI as usual. The Lutris package runs in an FHS which makes everything work even though the runners are not built for NixOS.

It turns out that what I was missing (I think) was 32-bit DRI support. I enabled that with these lines in my NixOS configuration:

# in /etc/nix/configuration.nix

hardware.opengl = {
  driSupport = true;
  driSupport32Bit = true;
};

Everything below this edit is red herrings.

/end of edit*

I tried installing a runner, lutris-GE-Proton8, through Lutris itself as I do in another distro. That crashed with some sort of error - instead of spending time investigating that I thought I'm probably supposed to install things the Nix way so that dependencies are set up correctly.

I tried installing Wine from nixpkgs like this, and configuring Lutris to use the system Wine:

home.packages = with pkgs; [
  (lutris.override {
    extraPkgs = lutrisPkgs: [
      wine
    ];
  })
];

But when I start up a game I get a warning telling me that I need a version of Wine with esync.

I found a Nix expression for wine-ge in the nix-gaming repo. So I tried building Lutris with that. Here is an excerpt of my Home Manager flake.nix:

{
  inputs = {
    # ...
    nix-gaming = {
      url = "github:fufexan/nix-gaming";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, home-manager, nix-gaming, ... }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in
    {
      homeConfigurations."jesse" = home-manager.lib.homeManagerConfiguration {
        # ...
        modules = [
          ./home.nix
          # ...
        ];
        extraSpecialArgs.inputs = { inherit nix-gaming; };
      };
    };
}

And the my attempt at a Lutris config in home.nix:

home.packages = with pkgs; [
  (lutris.override {
    extraPkgs = lutrisPkgs: [
      wine
      inputs.nix-gaming.packages.${pkgs.system}.wine-ge
    ];
  })
];

After a great deal of compiling I believe that I have wine-ge installed... somewhere. (I did try to use the nix-gaming binary cache. I probably messed that up by forcing my version of nixpkgs. I'll probably let nix-gaming use its own nixpkgs version next time.)

I've read that the lutris package creates an FHS (Filesystem Hierarchy Standard) environment. That is a filesystem somewhere with the directory layout you see in other distros. I expected that wine-ge would be linked into the FHS somewhere. I had the thought that I would configure Lutris with the path to wine-ge. But the file browser that I get in Lutris seems to show me the host file system, not the FHS.

I thought that maybe I could give Lutris the store path to wine-ge. Then if when I upgrade I'll have to track that down and set the path again. Is there a better way?

22
About to get started with NixOS (self.operating_systems)
 

I've been thinking about trying NixOS for a while. I think the concepts are elegant, and I have been finding Nix flakes to be very nice for software development. I'm about to get a new machine so I'm ready to take the plunge. Any advice before I dive in?

I'd like to set up Gnome with some extensions. One of the things I especially want to learn is how to set up graphics drivers, Vulkan, and Lutris.

For anyone who hasn't heard of it, Nix is a "declarative" package manager. Each package is stored with a hash that encodes its exact source, build script, dependencies, etc. You can have packages installed with mutually-incompatible library dependencies, and Nix makes it just work. For purposes of setting up per-project dependencies Nix does what Docker does, but faster, with more cache hits, and without emulation / containerization. If you want to deploy Docker images, Nix can build images that are more efficient than what you get from dockerfiles.

You can use Nix as an additional package layer in Linux, MacOS, or Windows with WSL. Think of it as an alternative to Homebrew.

NixOS is a Linux distro that uses Nix as its primary package manager, and uses Nix principles to manage configuration. Instead of running commands to install things, and then later forgetting what you installed or why, packages are listed in config files. The system installs and links packages as necessary. Anything you remove from your config is unlinked. When you want to reclaim space you can garbage-collect unused packages.

 

I'm moving soon and I won't have access to my desktop computer for a few weeks. I'm shopping for a laptop to continue my programming work during that time, and as a supplement for later when I want portability. Does anyone here have a favorite?

I made my own mechanical Bluetooth keyboard that I want to use; so I'm curious about 2-in-1 or tablet devices where the keyboard can be put out of the way, or even excluded.

I'm looking for:

  • portability over power
  • but enough power to run Rust Analyzer without being painfully slow
  • high-resolution screen
  • doesn't have to be the latest model

I'm a longtime fan of the Dell XPS 13, but I haven't tried any of the 2-in-1 versions. The Asus Zenbook Flip also looks promising.

I'm thinking of trying out Nix' remote builds feature to shift load away from the local processor and RAM. But I'm sure that won't funny eliminate the need for some local processing power. It'll be interesting to find out.

view more: ‹ prev next ›