Nix / NixOS

2310 readers
1 users here now

Main links

Videos

founded 2 years ago
MODERATORS
176
 
 

Hi all Nix experts,

I recently started using nix to manage my dev environment on my immutable distro, and I need some help.

I was wondering if I am using a large package like TexLiveFull, how to make sure nix don't delete large packages after I close the shell? I also don't want this package to be available in my global environment, as I don't need to use it outside vscode.

Another question is how to keep my packages up-to-date. I don't do serious development work, thus I typically perfer my package and dev-tools to be on the latest version. I prefer to have a little management of this as possible. Ideally, every time I start up a nix shell, the package manager will grab the latest version of the package if possible without requiring additional interaction from me. Is this possible?

Finally, is there any way to bubblewrap programs installed by nix to only access the file within the starting path of the shell? I don't imagine this is possible, but it would definitely be nice if nix has some security feature like this.

Thanks in advance for your help! I understand parts of this post might be ridiculous. I am still new to nix. Please correct me if I am not using nix in the "correct" way.

177
178
179
180
 
 

cross-posted from: https://pawb.social/post/6260688

Recently, I switched to NixOS and realised that there is no G'MIC plugin package for Krita.

There's this issue that was last active in October 2023.

I was wondering if anyone has managed to install this without using another package manager (such as Flatpak) or installing an AppImage manually, for system reproducibility, and I also don't wanna have two package managers in one system.

Ideally, there'd be a wrapper, so you could do something like:

{ pkgs, ... }: {
  programs.krita = {
    enable = true;
    gmic.enable = true;
    gmic.package = pkgs.krita.gmic-qt;
  };
}

Thoughts?

Related: is there some kind of guide on these program.<name> wrappers? What are they and where are they defined?

181
182
183
184
 
 

cross-posted from: https://feddit.de/post/7895009

I'm a semi-recent NixOS user and one thing that bothers me since the beginning is that when I change the Gnome theme (between light and dark), Firefox doesn't adapt. The system theme in Firefox is enabled, but it always displays the light theme, no matter what theme is selected in Gnome.

Internet search, including searching through NixOS discourse, packages, options and Nixpkgs repo surfaced a solution.

Any ideas or tips how to achieve system theme integration for Firefox on NixOS?

NixOS 23.11 / Gnome 45 / sway

185
 
 

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

If all goes well, we can release the alpha by the end of March

Now Available on NixOS!

COSMIC Terminal joins a long list of COSMIC DE projects that have been packaged for NixOS! While COSMIC DE will be the flagship desktop for Pop!_OS, it's designed and architected for distros to build their own custom, branded user experiences. Details for distro packaging will be released at the same time as the alpha.

186
187
 
 

Audio-relevant sections of my nix config:

    pipewire = {
      enable = true;
      alsa.enable = true;
      alsa.support32Bit = true;
      pulse.enable = true;
      # If you want to use JACK applications, uncomment this
      jack.enable = true;
    };

    blueman.enable = true;
  sound.mediaKeys = {
    enable = true;
    volumeStep = "5%";
  };

  environment.systemPackages = with pkgs; [
     pkgs.pulseaudio
     pkgs.pavucontrol
     pkgs.xfce.xfce4-pulseaudio-plugin
     ....
  ];

  nixpkgs.config.pulseaudio = true;

  hardware.pulseaudio.enable = false;

I don't know if this is due to pipewire or not, but this configuration gets my sound working fine and I can use the sound applet to change the volume. However, the media keys do not react and I can not change the volume nor play/pause/stop a song.

I'm using a Framework laptop with https://github.com/NixOS/nixos-hardware.git added, if that makes any difference.

Any help deeply appreciated.

188
189
 
 

It's a WIP, but I hope it's understandable and contains the necessary information to start packaging something using the builtin derivation function.

190
1
submitted 2 years ago* (last edited 2 years ago) by tinkralge@programming.dev to c/nix@programming.dev
 
 

Despite the name, the nixlang wiki is a community contributor wiki to document things around nix that the maintainers haven't gotten around to, to short-circuit the lengthy review process for the official documentation, and an attempt to make an entry into the nix ecosystem easier.

It's difficult to write things from a perspective of somebody who doesn't know, despite once being that person!

It would be great to have some feedback on the wiki.

P.S I'm not the maintainer, just a contributor.

191
 
 

๐Ÿ—“๏ธ Mark your calendars! NixCon North America 2024 is happening on March 14th and 15th at the Pasadena Convention Center in Pasadena, CA, USA. Submit your talk or workshop proposal before December 31, 2023, 11:59 PM PST. Be a part of this exciting event! More details at: https://discourse.nixos.org/t/nixcon-na-2024-call-for-proposals/36491

192
 
 

From this thread I found out about https://devenv.sh and https://www.jetpack.io/devbox but I'm having trouble comparing them to nix-shell.

Are they wrappers around nix-shell? They seem to do the same thing with services, devcontainer generation, environment variables, etc.

193
194
 
 

Hi all, looking for tutorials online is cool and all, but sometimes you just wanna sit down and read a physical book to understand something. So I was looking for suggestions on which books helped you the most, or which you've heard positive things about. Thanks!

195
196
 
 

A key thing to note:
"Updating with nixos-rebuild boot and rebooting is recommended, since in some rare cases the nixos-rebuild switch into the new generation on a live system might fail due to missing mount units."


Also I'm not sure if this is the beta release as Package Search currently(as of 3:22am) displays channel option: "23.11 Beta" (this might get updated soon who knows)


Other notable things that I've seen in the release notes:

  • sudo-rs is now supported
  • btrfs now can be auto resized
  • NetworkManager now uses nftables backend unconditionally
  • new service options for SearXNG "for better support"
  • new option for QEMU for enabling "specifying explicitly named network interfaces in QEMU VMs"
  • "virt-manager, an UI for managing virtual machines in libvirt, is now available as programs.virt-manager."
    • (this one's gonna be interesting for my config as I currently have it installed as a package, I'm gonna guess it's probably fine)
  • fail2ban configuration with attribute sets
  • "New boot.bcache.enable (default enabled) allows completely removing bcache mount support."

Either way I'd def recommend checking out their announcement and releases page for more details~
Thanks to the devs for making an awesone distro!๐Ÿค—๐ŸŽ‰

197
 
 

We are starting a new meetup group for the Rhein-Neckar-Region in Heidelberg, Germany.

The first event will take place on December 19 at the University's Mathematikon.

The twist is that we're beginning with a dual-topic meetup: Nix & Rust.

As there is some overlap between the two communities and we couldn't decide for which of the two we'd rather organize a meetup, we went for both in one.

The meetup is organized through the regional Mobilizon instance: https://rheinneckar.events/events/298e520c-89ca-4754-96f8-e252b96b7a46

Please sign up if you plan on attending so we can make sure there is enough space for all participants. Also feel free to drop an email at nixrust@rheinneckar.events or a Mastodon message at https://rheinneckar.social/@NixRust if you would like to become a speaker for the meetup, be it with a NixOS or Rust topic, or a combination of both!

The current (tentative) schedule:

  • 18:30 - Open Doors

  • 19:00 - Greeting

  • 19:05 - An Introduction to Nix

  • 19:30 - Second Talk (Rust related)

  • 20:00 - Networking and get together

198
 
 

Someone on another website asked me whether it makes sense to use agenix or sops-nix to encrypt secrets for NixOS configurations.

I realized that I hadn't seen a good overview article of the different approaches to secret handling in NixOS and when each one is appropriate to use, so I put down all of my knowledge and opinions in this post ๐Ÿคž

199
 
 

Sorry Noob here. This is my second time trying NixOS as a desktop. I just did a new installation of NixOS on my main pc.

In Arch my goto kernel was the Zen kernel. Is something similar available on NixOS ?

What kernels do you use / has got the most out of ?

200
 
 

I've made a fun little project inspired by this (except it's not updated any more).

It provides easy instructions for installing old versions of packages, it takes them straight from the official nixpkgs repo.

Example: https://history.nix-packages.com/package/dotnet-sdk_3/3.1.426 (.NET SDK 3.1 actually prompted the creation of this tool, I needed it for one old project).

Each detail page provides instructions on how to install the package using nix-shell, nix-shell with shell.nix file, configuration.nix and nix-env.

The design is based on https://search.nixos.org (because I suck at graphical design).

Do let me know what you think!

view more: โ€น prev next โ€บ