nixos

Use axel to get source instead curl for fetchurl in NixOS

Use axel to get source instead curl for fetchurl in NixOS I’m trying to start a shell with Cuda. I have following shell.nix file { pkgs ? import <nixpkgs> { } }: pkgs.mkShell { name = "cuda-env-shell"; buildInputs = with pkgs; [ unzip # other packages cudatoolkit # other packages binutils ]; } But this …

Total answers: 1

Sometimes printing is completed without printing

Sometimes printing is completed without printing I have a Brother laser printer DCP-1612W and when I print some PDFs with images the job is flagged as completed even if nothing was printed (but the printer makes some noise). I’m using brlaser driver. In cups log I cannot find anything useful. journalctl –follow –unit=cups Dec 06 …

Total answers: 2

How to configure ANSI text colors for NixOS console?

How to configure ANSI text colors for NixOS console? I’m on NixOS-unstable (as of 2023 Oct 1st). How can I configure the text colors for the default NixOS console, as the terminal supports ANSI? I tested what the colors look like by installing text-ansi on Haskell (GHC) and then putting some code snippets on GHCi, …

Total answers: 1

How to add documentation to Git package in NixOS?

How to add documentation to Git package in NixOS? git help some-alias prints the alias configuration value, for example: $ git help aliases ‘aliases’ is aliased to ‘!git config –get-regexp ‘^alias.’ | cut –delimiter=. –fields 2-‘ I’d like to instead provide detailed help for this and other aliases, in the same way git help diff …

Total answers: 1

zsh ignores zshrc most of the time (but not always)

zsh ignores zshrc most of the time (but not always) So when I open a new terminal (kitty) my ~/.zshrc is sourced perfectly fine, oh-my-zsh works, plugins are loaded as well as the p10k theme. But if I, for example, simply run zsh (or tmux) I get a shell that has sourced /etc/zshrc fine but …

Total answers: 1

Do GUIX and NixOS differ architecturally?

Do GUIX and NixOS differ architecturally? (This is not a "which distribution is better" question!) GNU GUIX and NixOS are two Linux distributions based on the NixOS package manager. I realize that GUIX seems to use Guile for defining packages/dependencies or other meta-data uses; and I’m guess everything in GUIX is GPL’ed, while perhaps not …

Total answers: 1

How to find values within Nix configuration

How to find values within Nix configuration I recently started using NixOS version 23.05.885.bb8b5735d6f. I see some (predefined) expressions in the configuration, but I don’t know what could be the actual value bound to these. For instance, I have hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; set in /etc/nixos/hardware-configuration.nix, and I would like to know what would be …

Total answers: 2

Declaratively configure multiple input sources under NixOS

Declaratively configure multiple input sources under NixOS I’m using NixOS 23.05.885.bb8b5735d6f. I usually configure two language selections set by input sources within GNOME Settings: [x80486@uplink:~]$ gsettings get org.gnome.desktop.input-sources sources [(‘xkb’, ‘us’), (‘xkb’, ‘es’)] I’m trying to see if there is any configuration within services.xserver to achieve the same result. So far the only key that …

Total answers: 1

Configure GNOME fonts using NixOS configuration file

Configure GNOME fonts using NixOS configuration file I recently migrated from Arch Linux to NixOS. While fiddling with NixOS configuration, I noticed there is a section to configure the fonts. This is how it looks like on my end: { config, pkgs, … }: { imports = [ ./hardware-configuration.nix ]; … fonts = { enableDefaultFonts …

Total answers: 2

Flatpak applications borked under NixOS

Flatpak applications borked under NixOS I just migrated from Arch Linux to NixOS. I configured the system to install GNOME. I’m used to install desktop applications using Flatpak, so I went ahead and configured everything…just to realize almost all Flatpak applications are borked and are unable to display the correct theme, fonts, and icons. This …

Total answers: 1

Why is minidlna closing connections with clients?

Why is minidlna closing connections with clients? OS: NixOS unstable App: minidlna I used minidlna successfully with Debian and my TV. But I am having problems with NixOS. This is my NixOS config (/etc/nixos/configuration.nix): #DLNA services.minidlna.enable = true; services.minidlna.settings = { friendly_name = "PCMEDIA"; media_dir = ["V,/mnt/ORION/DLNA/"]; log_level = "debug"; }; This is the log …

Total answers: 2

systemd.network DUID, IAID and DHCPv4 clientIdentifier

systemd.network DUID, IAID and DHCPv4 clientIdentifier I’ve set my NixOS to use: systemd-networkd: systemd.network.enable = true; and I have my interfaces configured something like that: networking { interfaces.enp5s0f0np0.useDHCP = true; interfaces.enp5s0f1np1.macAddress = cfg.myMacAddress; interfaces.enp5s0f1np1.ipv6.addresses = [ { address = "fd00:cafe::1"; prefixLength = 64; }]; }; Now for DHCPv4, I want to fix the clientIdentifier (ultimately …

Total answers: 1

How to replace OpenSSL with LibreSSL globally?

How to replace OpenSSL with LibreSSL globally? In light of the upcoming critical OpenSSL 3.0.7 security fix, how do I change NixOS over to use LibreSSL globally instead of OpenSSL? Asked By: l0b0 || Source From the official GitHub page: Compatibility with OpenSSL: LibreSSL is API compatible with OpenSSL 1.0.1, but does not yet include …

Total answers: 1

How to override an imported predicate?

How to override an imported predicate? Consider a /etc/nixos/root.nix containing the following: { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "foo" ]; } This configuration is imported into /etc/nixos/configuration.nix, which provides its own allowUnfreePredicate: { imports = [ /etc/nixos/root.nix ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "bar" ]; } In this case, only pkgs.bar …

Total answers: 1

When installing packages in NixOS, what is the difference between changing the configuration.nix plus nixos-rebuild-switch versus using nix-shell?

When installing packages in NixOS, what is the difference between changing the configuration.nix plus nixos-rebuild-switch versus using nix-shell? My usual process of installing things on NixOS is changing my configuration.nix, executing nixos-rebuild switch, rebooting, and choosing the new (last) OS generation. I know it is also possible to install packages via nix-shell (but I have …

Total answers: 1

How to make Linux installation verifiable/auditable?

How to make Linux installation verifiable/auditable? A major goal of open source is being able to audit/verify the software you run. But the moment we use that software hosted by a third-party we need to trust them.. If I ran an OSS service on a Linux box that I wanted to make 100% transparent, is …

Total answers: 1

How to keep PS1 when using nix-shell?

How to keep PS1 when using nix-shell? nix-shell changes PS1 to its own format. [nix-shell:~/snm]$ I tried adding check for "$IN_NIX_SHELL" inside ~/.bashrc, but it didn’t work. The only work around I found is to run nix-shell –run bash Asked By: andreoss || Source Since Nix 2.4 [1] there is NIX_SHELL_PRESERVE_PROMPT environment variable which makes …

Total answers: 3

No option for printing to PDF within Wine in NixOS

No option for printing to PDF within Wine in NixOS Most forum posts for other distros recommend installing a "cups-pdf" package to enable printing to PDF in non-standard applications like Wine. I can’t find any such package or option in NixOS; is there one? Asked By: l0b0 || Source Yes, there is. Add the following …

Total answers: 1