nixos

46 readers
1 users here now

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

founded 4 years ago
1
 
 

Perhaps nix & NixOS are two sufficiently broad sub-topics, but since both communities have been rather quiet (right now), perhaps they should be consolidated?

I'll be attempting to contact @Atemu@lemmy.ml (!nix@lemmy.ml mod) to discuss this, but I wanted to open it up to the community for a chance to provide feedback, arguments for/against, etc.

2
6
submitted 3 weeks ago* (last edited 3 weeks ago) by dadarobot@lemmy.sdf.org to c/nixos@lemmy.ml
 
 

I have a program that I wrote, maybe I didn't package it appropriately, but I cannot got it to run. I wrote it on a manjaro install, and tested it on another manjaro install, both were fine. I packaged it with poetry and copied the wheel over.

Today I tried to install it on my nixos surface tablet I use at work. I get this error on installation:

Traceback (most recent call last):                                            File "/home/gzuh/.local/bin/willcallgui", line 5, in <module>
    from willcallgui import willcallgui
  File "/home/gzuh/.local/share/pipx/venvs/willcallgui/lib/python3.11/site-packages/willcallgui/willcallgui.py", line 12, in <module>
    import tkinter as tk
  File "/nix/store/h723hb9m43lybmvfxkk6n7j4v664qy7b-python3-3.11.9/lib/python3.11/tkinter/__init__.py", line 38, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
    ^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_tkinter'

These are the packages i have installed... I'm trying to install it with pipx...

environment.systemPackages = with pkgs; [
    vim
    wget
    screen
    google-chrome
    openssh
    blackbox-terminal
    tailscale
    gnome.gnome-tweaks
    imagemagick
    git
    python311Full
    python311Packages.tkinter
    python311Packages.pip
    python311Packages.pipx

  ];

What am i missing?

3
4
5
 
 

cross-posted from: https://beehaw.org/post/13758256

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

6
7
8
 
 

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

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

9
10
 
 

cross-posted from: https://leminal.space/post/4750886

It took me some time to work out how to get my ssh agent set up in Niri so I though I would share what I did. I'm using NixOS and Home Manager. I put this in my Home Manager config:

services.gnome-keyring = {
  enable = true;
  components = [ "pkcs11" "secrets" "ssh" ];
};
home.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh";

I'm using GDM according to NixOS' default configuration which I think runs gnome-keyring (I thought I saw it in the process list before I set up the user unit), and I think that configuration is automatically unlocking gnome-keyring when I log in via PAM integration. But apparently I need to run gnome-keyring again in my window manager session. Home Manager's services.gnome-keyring adds a systemd user unit that does that.

11
12
 
 

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 ?

13
14
 
 

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.

15
16
7
PXE Template? (self.nixos)
submitted 9 months ago by GnomeComedy to c/nixos@lemmy.ml
 
 

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!

17
18
 
 

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?

19
 
 

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?

20
 
 

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

21
 
 

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)

22
23
24
 
 

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?

25
 
 

I've been using Nix and NixOS for 4 years now. While I like using it for my PCs and tried using it for servers with success, I think its ecosystem still is immature for development and production purposes, and thus my passion for Nix has faded.

So my question is what keeps you using Nix or NixOS? How have you been using it? Do you still feel passion and hype for it?

view more: next ›