Nix / NixOS

1765 readers
3 users here now

Main links

Videos

founded 1 year ago
MODERATORS
126
3
submitted 8 months ago* (last edited 8 months ago) by shortwavesurfer@monero.town to c/nix@programming.dev
 
 

So i followed the instructions to install virtualbox and added myself to the vboxusers group, but i cant run VMs as a standard user. The GUI message says "VirtualBox kernel driver is not accessible, permission problem" the VM log says "ERROR [COM]: aRC=E ACCESSDENIED (0x80070005) aText={The console is not powered up}"

Someone on mastodon mentioned /dev/vboxdrv and that file is "crw-rw---- root vboxusers". There is also a file /dev/vboxdrvu which is "crw-rw-rw- root root" but changing that to root vboxusers with chown didnt work.

I can run VMs as root just fine. Any thoughts?

Edit: new to NixOS and really enjoying it so far

Edit 2: SOLVED: I had "virtualbox" as a package under "envoronment.systemPackages = with pkgs; [" and wasnt supposed too.

127
 
 

I just switched one of my systems over to NixOS from Arch and so far it seems interesting. One question I had is regarding the nix-shell. So I get the basic concept of it and that it allows creating a shell that has packages installed with that shell making ideal for dev environments. I've even seen talks where the suggest nix-shells over docker/podman, my question is how is persistent data (like databases) handled?

128
129
 
 

While updating home-manager I got a notice that freeimage-unstable-2021-11-01 is marked as unsafe.

Since chances are it's used by something I never use, I'd like to know what I'm using that depends on it... any idea how to do it?

Also.. any idea why I have 4 copies of the freeimage stuff in my /nix/store? (I just run nix-collect-garbage -d and the 4 seem to be actually different):

❱ md5sum /nix/store/*freeimage*/lib/libfreeimage.a
67a0ce1cb5dd562473e27d7c88e8a9bd  /nix/store/6gi6hm57zngqnxb6p5dnxhjjcbr96lrk-freeimage-unstable-2021-11-01/lib/libfreeimage.a
5995e0affbfa28b63da7e997cb4dbe63  /nix/store/09nwykzzksc0zknflsyxyah5b67c2rsn-freeimage-unstable-2021-11-01/lib/libfreeimage.a
67a0ce1cb5dd562473e27d7c88e8a9bd  /nix/store/ikfiv4gpmcpyir7lsj45by653qcnvgyx-freeimage-unstable-2021-11-01/lib/libfreeimage.a
213a408e3c1fbb5dfa4491deebe05984  /nix/store/q2sc85f2hclgwl8m3qdw8rpbs44gzmah-freeimage-unstable-2021-11-01/lib/libfreeimage.a
130
131
12
submitted 9 months ago* (last edited 9 months ago) by jakalx@lemmy.ml to c/nix@programming.dev
 
 

Hi,

how would one create a development environment for #xmonad contained within my nixos system configuration?

My flake for my system sets up xmonad with a custom config.hs and I'd like to get a suitable dev environment when editing the config.hs. Usually when developing for haskell, I'll use a flake and setup a devShell which then gets loaded by direnv.

  • is there best practice?
  • my config.hs is in a subdirectory

My first attempt would be to just provide a shell.nix next to my config.hs - but that wouldn't load the exact same xmonad as the system one, since it's separate from the flake.

132
 
 

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.

133
134
135
136
 
 

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?

137
138
139
140
 
 

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

141
 
 

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.

142
143
 
 

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.

144
145
 
 

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

146
1
submitted 10 months ago* (last edited 10 months 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.

147
 
 

🗓️ 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

148
 
 

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.

149
150
 
 

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!

view more: ‹ prev next ›