nixos

1104 readers
30 users here now

All about NixOS - https://nixos.org/

founded 4 years ago
1
 
 

Hi, I am a beginner on NixOS and I am confused how to setup fonts on it. I have home-manager working properly and nerd-fonts installed. Now how to setup System,GTK,emoji and Indic fonts.

Any article or part of config please.

2
3
 
 

So I have been experiencing screen blackout when I use any refresh rate above 60Hz. On Arch I was able to solve this by setting a udev rule as mentioned in this ArchWiki article but it seems like I can't do the same in NixOS using the traditional way. Is there anything I need to add in the configuration.nix file to achieve the same ?

4
5
 
 

Hi, sorry if that title isn't very clear. I just started learning about nix a couple days ago; I'll explain what I mean.

I'm trying to set up a web application that I'm currently hosting with Docker containers, but do it with nix instead, like what's shown in this blog post: https://carjorvaz.com/posts/the-holy-grail-nextcloud-setup-made-easy-by-nixos/

However, I don't have NixOS on my server. I'm using Debian, with the nix package manager installed.

Is it possible to use a nix config file, like the one below, when only using the nix package manager? Currently it errors when I try to call nix-build with it, giving an error about calling a lambda function that never called self. If I remove the self argument, it complains about config, and so on.

{ self, config, lib, pkgs, ... }:

{
  services = {
    nextcloud = {
      enable = true;
      hostName = "cloud.example.com";

      package = pkgs.nextcloud27;

      # Let NixOS install and configure the database automatically.
      database.createLocally = true;

      # Let NixOS install and configure Redis caching automatically.
      configureRedis = true;

      < other settings here... >
    };
  };
}

From what I've read, the services part of that creates systemd services, which makes me think that it only works if you're on a full NixOS system and not only using the nix package manager. But it's been difficult to find a clear answer on that, probably because I'm still learning what terms to search for.

6
7
 
 

Does NixOS have a way to PXE many machines via a kickstart or preseed equivalent? I'm curious to experiment with it in the context of a University environment and we use either Cobbler or Foreman for host provisioning.

Also curious what the best practice is for config management. I only know enough to know there's a nix config file that declares everything. Does this completely supplant puppet/salt/ansible, or do you use them together?

Thanks for any tips!

8
9
 
 

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?

10
 
 

So, I got into NixOS and installed it on a VPS a few days ago. I've previously used yunohost.org (a debian based all-in-one selfhosting solution) and docker-compose. But I (now) really like the Nix(OS) approach, the amount of packaged software and how everything ties together in a clean server configuration.

However... I need a bit more information on the server stuff. Are there nice configurations around which I can incorporate and learn from? Extensive tutorials from other people who run their own services or communities?

I mean the basic stuff isn't a problem. I got Nextcloud and the most important stuff running, a DNS Adblocker, a chat server, nginx etc. But ultimately I'd like to share some services with friends and family. So I need single sign-on (SSO), preferably with an LDAP directory. An email server... And the Wiki and just googling it stop being helpful at this point.

Are there people who share their experience with LDAP/Authentik/Zitadel/Authelia/Keycloak / whatever SSO/Authentication software is packaged in Nix but I can't find anything about from people who actually use it? A comparison of the several available email servers?

11
 
 

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

12
 
 

Any bried guide on building from source. I want build friclicli as not in nix repo. Tried to search on internet but didn't got anything. (New to nixOS)

13
14
15
 
 

I've seen people use nix-doom-emacs, have it set up standalone, and some have fancy Nix code that's way beyond my understanding for now to set it up. Which one is the recommended way to set it up? Also, how do you get completions in nix-mode?

16
 
 

Yesterday I tried to update my nix flake but the rebuild-switch failed when it came time to install the following python3 derivation with some extra python packages:

(python3.withPackages(ps: with ps; [ numpy scipy matplotlib pandas notebook ]))

The problematic package is "notebook" and building fails with the following error:

error: builder for '/nix/store/crxnqidkwkgxm9s7ahkhvilx1cisrki6-python3.10-jupyter-server-2.0.6.drv' failed with exit code 1;
       last 10 log lines:
       >     pyfuncitem.obj(**testargs)
       >   File "/build/jupyter_server-2.0.6/tests/extension/test_launch.py", line 105, in test_base_url
       >     launch_instance(["--ServerApp.base_url=/foo"])
       >   File "/build/jupyter_server-2.0.6/tests/extension/test_launch.py", line 83, in _run_in_subprocess
       >     wait_up(url, check=lambda: process.poll() is None)
       >   File "/build/jupyter_server-2.0.6/tests/extension/test_launch.py", line 40, in wait_up
       >     time.sleep(interval)
       >
       >  Timeout
       > /nix/store/gv2cl6qvvslz5h15vqd89f1rpvrdg5yc-stdenv-linux/setup: line 1604: pop_var_context: head of shell_variables not a function context

The very same python derivation worked like 2 weeks ago but now suddenly doesn't work anymore. I'm quite lost trying to troubleshoot this problem so any help is greatly appreciated.

EDIT: So far I've tried the "jupyter" package instead of the "notebook" package, installed it through the unstable channel and tried to install "jupyterlab" as an alternative, but to no avail.

17
 
 

after updating to the new version of Dolphin, I noticed the icons don't show up in the "Icons" layout.

18
19
20
 
 

If anyone wants to help package COSMIC in nixpkgs (and for NixOS) join the Matrix room :3

21
 
 

I hope this is the right place to ask. I am new to Nix and trying to use it for now as a universal package manager. I installled Stremio using Nix but the app doesn't work properly. I see that it's several versions out of date. The same app works fine using Flatpak. Is there a way to let the maintainer know? I'd also love some documentation that can help me update it myself. I can just use the Flatpak but I just want to have one less package manager to worry about.

22
 
 

This is something that I struggle with. I know how to find top-level packages like git or cowsay. But what about utilities under nested paths? I always spend ages digging through the nixpkgs source code to try to find utilities to use in my nix expressions.

Today I want to use buildRustPackage. It's defined here, and is propagated here. But how do I access it given a pkgs variable? I have no idea!

https://search.nixos.org/packages is no help

nix search nixpkgs doesn't find it

I think I need to search by attribute name, not by derivation name. But I don't know how to do that.

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

It took me a while to figure this out. I use Home Manager to manage my Gnome settings by setting dconf.settings = { ... }. My settings are non-trivial (for example my paperwm module). So it's helpful for me to check the actual dconf settings that Home Manager produces.

To do that build your configuration with home-manager build, open result/activate, and find a line that looks like this:

$DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION /nix/store/4ab7dx08wx640444m71axlqvbrvz73bv-dconf-0.40.0/bin/dconf load / 
  &lt; /nix/store/0hdnvwx8d9sifd6ib8n2hhblyblq0ccp-hm-dconf.ini

The store path for hm-dconf.ini has the settings.

Edit: added a line break to the script line so you can see the relevant store path

24
 
 

I'm developing a small library which intercepts some library calls from a program installed via home-manager. My library works fine outside of nix, but it fails when trying to intercept calls from a program installed via home-manager. I figured that it is related to hardcoded library paths in my interceptor library.

lld shows

linux-vdso.so.1 (0x00007fff7a341000)
libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007fb2f3b72000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb2f391c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb2f38f8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb2f3716000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb2f3637000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb2f3cac000)

What is the preferred approach here?

  • Changing the paths in my binary doesnt seem very portable?
  • Setting LD_LIBRARY_PATH seems also a hassle
  • Are there linker settings which could help
  • Or, should I "just" (no idea, how to do this) create a derivation for my program and install it via home-manager, too?

Any pointers are greatly appreciated. Cheers!

25
1
Tried NixOS ! (dvd.chat)
submitted 1 year ago* (last edited 1 year ago) by canute@dvd.chat to c/nixos@lemmy.ml
 
 

Tried NixOS !

So I tried nixos and I love how things work, I am glad that it exists. Will learn about Flakes today. Any recommended resource to learn it? :)

@nixos@lemmy.ml

view more: next ›