Nix / NixOS

1765 readers
8 users here now

Main links

Videos

founded 1 year ago
MODERATORS
76
 
 

Power on my dell laptop is getting wonky so I'm pulling the thinkpad x201 out of retirement. Hadn't booted it since 2019! For some reason the wifi wasn't working so connected it to wired ethernet.

Updated the channel to 23.11 and did nixos-rebuild switch. Had to fix a few things where packages no longer exist or options have changed. Rebooted and wifi is working now!

What other OS could you upgrade like that?

77
 
 

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

The product of a chat with @QuazarOmega@lemy.lol

78
 
 

You can change the color theme of your whole desktop with a single line of code.

Currently supported adapters:

  • Adwaita (GTK3, GTK4)
  • Alacritty
  • dunst
  • Firefox (hijacking the default theme with userchrome.css)
  • GTK2
  • Kvantum
  • Rofi
  • swaylock
  • Wezterm

repo: https://gitlab.com/vfosnar/nix-colors-adapters / https://github.com/vfosnar/nix-colors-adapters

79
28
Nix 2.22 released (releases.nixos.org)
submitted 6 months ago by mac@programming.dev to c/nix@programming.dev
80
81
 
 

I'm very, very new to nix and nixOS both - I come from imperative workflows and very very rarely anything determinative, so this is all brand new to me.

As an example of the kind of thing I don't understand how to do, let's take an example repo I've been bouncing off: https://github.com/GideonWolfe/Chameleon

On a "normal" system, I can get pip and python ready, and then make install and I'm off to the races.

With NixOS, I've got as far as adding python3 and gnumake to my configuration.nix packages. (I have also discovered that putting python in my system packages was the wrong move, so some advice on how better to go about this would be cool too.)

I can't for the life of me wrap my head around what I'm supposed to do, and so many people online are using flakes but I'm on stable 23.11 (and quite daunted by flakes) so I'd prefer if this was from that POV.

Can anyone speak to any of these points? I've tried reading the docs but it's very confusing for some reason.

82
 
 

Yes I know that there are workarounds for them to set to use the flake inputs but still.. I have set nixpkgs version to 23.11 stable release and that's good, but if I try to use nix shell, nix profile or even nix-env, they all seem to use the latest master/unstable branch to install the packages by default.

Just want to know why aren't they just default to use whatever is defined in flake.nix file? will it be implemented to use it by default in the near future?

Reason as to why I am asking -> This is what I am using to match nix shell and flake inputs, but as you can see they are just workarounds, plus seem to cause more errors and whatnot, plus by ideology one shouldn't need to specially define it to use some version when everything is already defined.

83
 
 

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

Exciting Partnership Announcement: Framework Community & NixOS Communities Join Forces!

84
 
 

See I use wofi-emoji but this issue #308357 is haunting me. So I just wanted to know what my fellow users use cuz I guess not a lot of people use wofi-emoji.

85
 
 

I know that if using flakes nix shell is the right command. But I just want to know that is it normal for legacy commands to not work like that one? nix-env works tho.

  • Dotfiles

  • One thing to note is that, what I am doing temporarily is running it using this

nix shell nixpkgs#nix-info
nix-info
  • And the output value is this
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.86, NixOS, 23.11 (Tapir), 23.11.20240417.e402c3e`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `not found`
  • Notice the nixpkgs: not found, This is also weird to me.

  • logs ->

error:
       … while calling anonymous lambda

         at «string»:1:1:

            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
             | ^

       error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
86
 
 

Eelco has agreed to step down from the NixOS foundation board. Over the next two weeks, a constitutional assembly will be appointed to draft a constitution to democratically govern Nix/NixOS.

87
1
submitted 6 months ago* (last edited 6 months ago) by starman@programming.dev to c/nix@programming.dev
 
 
88
56
submitted 6 months ago* (last edited 6 months ago) by recursive_recursion@programming.dev to c/nix@programming.dev
 
 

I just saw the news of the soft fork announcement over on the IceShrimp instance and thought I should share here


Background Context for Anyone Out of the Loop

(newest to oldest news - top to bottom):


As mentioned (by u/steventrouble in the previous post here):

89
 
 

Searched about it could not find much. I am on nixos.

90
91
 
 

Hi everyone,

I presented about how you can use ❄ Nix with Golang to create development environments at Conf42 earlier this week! I'd love some feedback, hopefully I didn't get anything wrong 😅.

Thanks

92
 
 

So I have an RTX 3060, and I tend to prefer using wayland because Plasma 6 on X.org is a bit bugged/sluggish, to the point where the window minimize animation lags. However, I also want to play some pirated video games. The natural answer to this would be to use wine, and so I did. I used the wayland build for wine, but there's a strange frame-skipping phenomenon. I don't know what to call it, but the game skips back and forward in frames every couple seconds. The logs just constantly spam 017c:fixme:d3d:wined3d_device_context_resolve_sub_resource Multisample resolve is not fully supported for typeless formats (dst_format WINED3DFMT_R8G8B8A8_TYPELESS, src_format WINED3DFMT_R8G8B8A8_TYPELESS, format WINED3DFMT_R8G8B8A8_UNORM)., filling the scrollback buffer.

Is there any solution to this frame-skipping problem? I haven't been able to find anything on SearX.

93
94
 
 

Hi! I ran into the issue that my kube config, which I manage with home-manager is world read- and writable. I hoped that there is an easy option to set file permissions with home-manager, e.g. home.file."foo".permissions = 0644 but something like this does not exist. All solutions a short web search turns up are overly complicated for something that seems to be a trivial task.

What is the easiest way to set permissions for a file with home-manager?

95
 
 

I've heard cosmic is in the process of being packaged for nix, but on the tracking issue the only things not complete are the video player and the app store, neither of which I care about

Is there any halfway sensible way to get the bits that do work running on nixos? Would quite like to try this desktop out

96
 
 

So Ive been using nixos with gnome for almost a year now and things have been pretty smooth, it's just amazing, I never looked back since I started using it. So to make things more interesting and learn stuff I am trying to install hyprland, Ive no idea what window manager, compositor etc are, I have few questions Will installing hyprland delete gnome? Is hyprland not a desktop environment but something else? If yes, then how does it differ from one and what are its pros/cons? Would you suggest a clean installation to reduce bloating, or install on an existing system?

97
 
 

Is it possible to mount a Nextcloud folder into the filesystem within the nix config that other services can use it? For example have a jellyfin server use the a family shared nextcloud folder

98
 
 

I'm trying to switch my home server over to nix and currently I'm struggling a bit with k3s. In a "regular" distro I would just create a registries.yaml in /etc/rancher and the rest happens on its own - that's not really how nix is supposed to work, though.

So how would I do that? There seems to be no way to create a registry using the command line (so the ConfigFlags option won't work), so pointing to the config file directly seems to be the way to go.

But how do I do that in a "nixy" way? Can I somehow say "this string here is actually a config file that's supposed to be in that dir"?

99
 
 

100
 
 

cross-posted from: https://lemmy.world/post/14160134

I want to reset my server soon and I'm toying with the idea of using a different operating system. I am currently using Ubuntu Server LTS. However, I have been toying with the idea of using Fedora Server (I use Fedora on my laptop and made good experiences with it) or even Fedora CoreOS. I also recently installed NixOS on my desktop computer and find the declarativeness pretty cool (but I'm still a complete beginner) and could imagine that it would fit well into a server setup.

I have quite a few services running on my server, such as Nextcloud, Conduit (Matrix), Jellyfin, etc. and all in containers. I would also rather not install programs without containers, because 1. compose is super easy to maintain and set up, 2. it remains very clear with containers (and compose) and 3. I believe that containers are more secure. But since I also want to make the services inside the containers available, I currently have Nginx installed as a reverse proxy (not in the container, but on the system) and always create certificates with certbot so that I can use HTTPS encryption.

In the paragraph above I actually described exactly the use-case of Fedora CoreOS, but I have no experience with the system and how it works. That's why I'm still a bit hesitant at considering the OS at the moment. I can imagine that NixOS with its declarative nature seems well suited, since, as I have heard, you can configure containers as well as Nginx and with Nginx also https certificates declaratively. But I could also use a base system like before (Fedora Server or Ubuntu Server) and simply install podman, nginx and certbot and manage everything that way.

Have you had any experience with Fedora Server, Fedora CoreOS, NixOS or a completely different operating system for servers and what are/were your impressions with this setup? Or do you just want to share your knowledge here? I would be delighted.

view more: ‹ prev next ›