/r/NixOS
NixOS is a Linux distribution with a unique approach to package and configuration management. In existing distributions, actions such as upgrades are dangerous: upgrading a package can cause other packages to break, upgrading an entire system is much less reliable than reinstalling from scratch, you can’t safely test what the results of a configuration change will be, you cannot easily undo changes to the system, and so on. We want to change that. NixOS has many innovative features:
Part of the Free Culture Reddit Community!
The free culture movement is a social movement for freedom of speech and expression and the elimination of gatekeepers in a digital age. We promote free software and other free cultural works as a matter of personal liberty and human rights.
When we say "free", we mean free as in "freedom".
List of all Free Culture Reddits
/r/FreeCulture Sister Reddits (NEW! Please subscribe and start submitting):
More featured Reddits (NEW! Please subscribe and start submitting):
Make sure your works are free by using a free culture license. Noncommercial ironically is nonfree, so choose a free license! For software, check out the FSF's license recommendations guide, and for other cultural works use one of the following licenses.
Copyleft:
Permissive:
/r/NixOS
Is it possible to define a list of values that a nix option can be? for example ,for monitor layouts, it must be set to one of the values in the `possibleValues` psuedo code below.
options.myHomeAttributes = {
layouts = pkgs.lib.mkOption {
default = "dual";
type = lib.types.str;
description = "layout options for monitors";
poSSiBleValUEs = ["dual" "single" "triple"];
};
};
Hey everyone,
I’m upgrading my PC from an Intel CPU to an AMD CPU, which means changing the motherboard as well. I want to make sure NixOS still boots properly after the swap.
If I set up boot.loader.grub.device = "nodev" (or auto-probe), ensure the bootloader is properly configured, and add AMD-specific kernel modules in configuration.nix, would that be enough for a smooth transition?
Or are there other steps I should take to avoid boot issues?
Thanks!
Hi,
Is anyone here running proxmox-nixos?
https://github.com/SaumonNet/proxmox-nixos
Proxmox installed on top of NixOS.
I'm about to try it out for my home server, any feedback?
Thanks.
I'm trying to manually build Tmux in the home.activation
. I get this error during ./configure
phase
checking for /nix/store/wp82603v23k1zhiz038w50dm6fzxg67w-bison-3.8.2/bin/yacc... no
configure: error: "yacc not found"
I checked and able to verify that /nix/store/wp82603v23k1zhiz038w50dm6fzxg67w-bison-3.8.2/bin/yacc
exists
Here's the current configuration
activation = {
tmux = config.lib.dag.entryAfter ["writeBoundary"] ''
export CC=${pkgs.gcc}/bin/gcc
export CXX=${pkgs.gcc}/bin/g++
export YACC="${pkgs.bison}/bin/yacc"
${pkgs.wget}/bin/wget https://github.com/tmux/tmux/releases/download/3.5a/tmux-3.5a.tar.gz
${pkgs.gzip}/bin/gunzip -c tmux-3.5a.tar.gz | ${pkgs.gnutar}/bin/tar xf -
cd tmux-3.5a
./configure LDFLAGS="-L${pkgs.libevent}/lib" CFLAGS="-I${pkgs.libevent.dev}/include" && \
${pkgs.gnumake}/bin/make && \
${pkgs.gnumake}/bin/make install
'';
};
So I finally dug in the past few weeks to learn NixOS, thanks to getting layed off and having nothing else to do but apply for jobs and fuck around with my computer. I started out overly complex trying to do flakes and home-manage immediately. I learned the basic stuff from this, but didn't really understand how or why anything works. So, as I'm learning we all have, I started my coonfig over about 100 times. This is mainly because everytme I would go and reinstall, I didn't have a way of saving my config.
So, and as a system admin I should know it anyway, I started learning how to use git. A good week went by and I realized that I have no idea how to write commits, changelogs etc. So after looking up proper ways to write commits, I found the Convential Commits standard.
So I started learning all about that and how to make git templates, gpg signing, etc.
I have been using Linux full time, in one flavor or another, since I graduated from highschool in 2014. I have learned more, and have had more fun working on NixOS in the past month than I have had in those 10 years.
Thanks NixOS.
Off-topic question: When do I get out of the phase of wiping and recreqting my config?
Hey everyone,
I'm having an issue on NixOS where my Ethernet connection is stuck at 100Mb/s, even though my hardware supports 1Gb/s, and it works fine at full speed on Windows. I've tried several troubleshooting steps but haven't found a solution yet.
enp6s0
r8169
r8169
, r8168
ethtool enp6s0 | grep Speed
Always returns 100Mb/s
sudo ethtool -s enp6s0 speed 1000 duplex full autoneg on
After running this command, the internet disconnects, and I have to run:
sudo ethtool -s enp6s0 autoneg on
More Specs:
ethtool enp6s0
Settings for enp6s0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: on
netlink error: Operation not permitted
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
Same cable and router: The same setup reaches 1Gbps on Windows. Different port on the router: Tried different LAN ports, still stuck at 100Mb/s. Different cable: No change.
I don´t know if I have to install Meidatek drivers or what, and if that is the case, also don´t know how to do it
Hello. I'm trying to setup flutter development on nixOS and am facing some problems due to how android-studio handles the path where android-sdk is located (which is nix-store) and there's an issue with permissions.
I want to achieve the following.
use android studio for emulator creation (also fine with just avdmanager)
flutter doctor shouldn't raise any issues, should have all green marks
i wan't to start emulator with flutter emulators (easier for me to put it on GPU)
flutter should recognize emulators created by android-studio.
Does anyone have a setup like this and can help me? I've tried using devenv, home-manager module, system-wide installation and even installing flutter via wget (nix really doesn't like the last one - of course).
Thanks in advance.
Hey guys, first things first thanks for taking some time to sift through this. I'm new to Nix in general, and all the programming practice I have is hobby tasks in free time using either Python or Ruby so forgive my ignorance.
I'm running into a bit of an issue obtaining my busId for my cpu, because there is no "VGA Compatible"output from ixsi or lspci. I read that this could be from a faulty motherboard or cpu but I would like to doubt that's the case.
My machine consists of a Ryzen 7 3700X and a Nvidia 2070 Super on a Gigabyte 520I AC mobo.
The output of lspci | grep "VGA"
is as below:
06:00.0 VGA compatible controller: NVIDIA Corporation TU104 [GeForce RTX 2070 SUPER] (rev a1)
The full output of lspci
is as below (hope the formatting isn't too bad I'm sorry):
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Root Complex 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Starship/Matisse IOMMU 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge 00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge 00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge 00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:05.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:07.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:07.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 0 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 1 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 2 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 3 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 4 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 5 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 6 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 7 01:00.0 Non-Volatile memory controller: Sandisk Corp SanDisk Extreme Pro / WD Black SN750 / PC SN730 / Red SN700 NVMe SSD 02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43ec 02:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 500 Series Chipset SATA Controller 02:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] 500 Series Chipset Switch Upstream Port 03:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea 03:03.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea 04:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (rev 10) 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 16) 06:00.0 VGA compatible controller: NVIDIA Corporation TU104 [GeForce RTX 2070 SUPER] (rev a1) 06:00.1 Audio device: NVIDIA Corporation TU104 HD Audio Controller (rev a1) 06:00.2 USB controller: NVIDIA Corporation TU104 USB 3.1 Host Controller (rev a1) 06:00.3 Serial bus controller: NVIDIA Corporation TU104 USB Type-C UCSI Controller (rev a1) 07:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function 08:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP 08:00.1 Encryption controller: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP 08:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller 08:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
Log from the kernel on boot regarding nvidia-powerd service
:
Feb 01 13:47:47 nixos systemd[1]: Starting nvidia-powerd service... Feb 01 13:47:47 nixos /nix/store/0f3vxd40gbzyvw1rilhlmnlys499b2wm-nvidia-x11-565.77-6.6.71-bin/bin/nvidia-powerd[1024]: nvidia-powerd version:1.0(build 1) Feb 01 13:47:47 nixos /nix/store/0f3vxd40gbzyvw1rilhlmnlys499b2wm-nvidia-x11-565.77-6.6.71-bin/bin/nvidia-powerd[1024]: Found unsupported configuration. Exiting... Feb 01 13:47:47 nixos systemd[1]: nvidia-powerd.service: Main process exited, code=exited, status=1/FAILURE Feb 01 13:47:47 nixos systemd[1]: nvidia-powerd.service: Failed with result 'exit-code'. Feb 01 13:47:47 nixos systemd[1]: Failed to start nvidia-powerd service. Feb 01 13:47:47 nixos systemd[1]: nvidia-powerd.service: Consumed 8ms CPU time, 1.7M memory peak, 1M read from disk.
This is what is in my configuration.nix for setting up my nvidia card:
# Enable OpenGL hardware.opengl = { enamdgpuBusId = "PCI:0:0:0"able = true; driSupport32Bit = true; }; # Enable Nvidia Wayland services.xserver.videoDrivers = ["nvidia"]; # Set proprietary Nvidia driver hardware.nvidia = { dynamicBoost.enable = true; open = false; # Set to true if you want to use the open-source driver modesetting.enable = true; nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.stable; # or beta prime = { offload = { enable = true; enableOffloadCmd = true; }; amdgpuBusId = "PCI:0:0:0"; nvidiaBusId = "PCI:6:0:0"; }; };
I used amdgpuBusId = "PCI:0:0:0"
because I was hoping that it would be a generic Id I could pass to bypass not having that busId. I'm sure that's pretty dumb, but I honestly didn't know what else to do. I would like to have this working so I can have working power-profiles for when I'm gaming and when I'm just browsing. I have gamescope setup to help but would still love to squeeze out that extra juice.
I'm sure there have been postings that have been made before with this exact same issue, and feel free to just drop a link to them. I have read a couple of them, and they do not make 100% sense to me and sometimes just left me with more questions.
TLDR: please help me find the busId for my cpu because there is no VGA output for it that I can find, thank you!
Is there a flake configuration equivalent to the channel-based system.autoupgrade
? (manual)
Goal: Have a golden source place where i define some key config attributes to be used throughout my nixos config.
use the attribute defined in golden source anywhere throughout my nixos and home-manager configurations without having to manually pass it as an argument at the top of 10 different `.nix` files.
Previously i have been passing around my custom attribute in the arguments at top of .nix files e.g. { config, lib, pkgs, mycustomvar }
. this seems quite cumbersome as you get modules and sub-modules which each need to pass around the attribute. Is there a way to define custom attributes in the config
block and then call config anywhere throughout your files to access the attribute?
flake.nix
options = { myEmailAttribute = pkgs.lib.mkOption { description = "foo@bar"; }; };
somefile.nix
{ lib, pkgs, config, ... }: {
programs.git.email
= config.myEmailAttribute }
My flake.nix uses unstable...
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
in my configuration.nix I add the pritunl package...
systemPackages = with pkgs; [ ... pritunl-client ... ];
but systemd does not become aware of this package.
I used nix repl to dig into the pritunl-client/package.nix
$ nix repl
nix-repl> :l <nixpkgs>
Added 23629 variables.
nix-repl> :e pkgs.pritunl-client
to find pritunl-client/package.nix which seems to be doing things with the pritunl-client.service file.
Further, I'm able to find these files in my /nix/store after a nixos-rebuild switch
fd -g '*.service' /nix/store/*pritunl-client*/
Yet neither the root nor user invocation of systemctl
knows anything about this service.
I checked on NixOS Options Search but there does not seem to be a familiar and expected services.pritunl-client.enable
option listed. Indeed if I try it, I'll get the "does not exist" upon building.
What's the missing step here?
Is this a bug or user error?
UPDATE: I figured it out eventually, see... comment below
Hi, I’m new to Nix. Recently, I tried to configure Nix-Darwin for my Mac, and I want to save my flake.nix file to my dotfiles. I attempted to use Dotbot to create symlinks for the folder, but I can’t rebuild my configuration.
Any idea for this?
Lately, while waiting for my NixOS config rebuild to finish, I was thinking about the title. It might be a stupid question, and someone might-ve thought of it earlier, but:
- I am on nixpkgs unstable, and sometimes nix needs to build/compile a couple of packages (extest, OVMF, xwayland, patching NVIDIA proprietary driver) by itself when doing a `nix flake update && nh os switch .`.
- Waiting for system updates might be a hassle, which is why my experience, compared to a more traditional package manager, is just that most things to do with Nix are just sluggish... (yes, also because nix eval is single-threaded, but I know determinate is already addressing that, so hype to them)
- Other people might need to rebuild some stuff too
- Every package can be proven to be built reproducibly or not, and nix tries to guarantee that a certain input hash always corresponds to the exact same output every time
So why can't cache.nixos.org be croud-sourced? I get that technically it might be hard to stop abuse, but if people are willing to contribute to the caches, why not? There are some caveats though:
- Sometimes people are building packages from very old `nixpkgs`, so those should not be accepted by some hypothetical crowd-sourcing system
- People could try to break the system by sending huge bogus uploads to the server
- People could maliciously create a supply-chain attack by uploading a vulnerable version (but I do think such a thing could be avoided with some kind of mathematical proof that a certain upload is exactly what it says on the tin)
But still, has people spoken of this before, or am I missing something? Because to me, albeit full of technical hurdles, it could improve the Nix ecosystem altogether and reduce the amount of "gentoo-ness" for more people when building a nixos/home-manager config on nixpkgs-unstable.
Or maybe I am the only one bothered by waiting ~10m for a full system upgrade, coming from Arch Linux.
Anyways, I figured this might be an interesting topic, anyone with thoughts?
Before I install NixOS, I already have a working Arch Linux partition. So when I install NixOS, I create a new boot partition named NIXOS-BOOT rather than reusing the old one.
Disk layout, which includes (in order) old boot partition, arch linux, new boot partition, nixos
I also set useOSProber
to true
(and then run sudo nixos-rebuild switch
):
Hello, I am having my nixos configuration for 4 of my computers in my git repo (Mac and Nixos) and in one of the folders I store my nvim confuration.
Nixos however with every build links the .confiv/nvim folder into the nix store which is not my intention. I would like it to be linked directly to the nvim config i have in my repo so changing configs and updating nvim lock would also update files.
Is there a way around that? I have tried mkOutOfStoreSymlink but it seems like not solve my issues.
My example nvim module:
{ config, lib, username, ... }: with lib; let
cfg = config.features.home.lazyvim;
inherit username;
in
{
options.features.home.lazyvim.enable = mkEnableOption "Enable cli setup";
config = mkIf cfg.enable {
home-manager = {
users.${username} = { inputs, pkgs, config, lib, ... }: {
home.file = {
".config/nvim" = {
source = config.lib.file.mkOutOfStoreSymlink (toString ./../../others/nvim);
recursive = true;
};
};
home.sessionVariables = {
EDITOR = "nvim";
};
};
};
}
Good day,
New to NixOS. Switched from Windows 11 to NixOS just yesterday. I was testing for like a solid week on VM before switching. I was aware of issues, but the laggy monitor was the most annoying thing.
Finally yesterday after trying all sorts of settings I have made it work. Not sure yet which settings are required to make it work as it is but works.
Only thing so far I have noticed is that when booting, the system stays in tty1 for few seconds before GNOME kicks in.
Here is link to the config file in my .dotfiles repo that fixed it.
https://github.com/Keranod/.dotfiles/blob/main/hosts/TufNix/gpu.nix
I will start cleaning it up a bit and commenting what the hell is going on in there.
If someone wants to enlighten me as well what am I doing even with less obvious settings, please feel free to leave a comment or DM me.
Edit1: To my understanding after playing a bit more there 2 things happening
- Disabling Intel GPU forces Nvidia to render everything, without any extra power consumption(for now)
- When nothing moves on the screen GPU usage goes to 0%/idle. Then when any action like scrolling or moving mouse on interactable page causes few ms lag before GPU starts working properly again. To prevent it a bit (now the lag takes around few ms not so noticable as before) I have also created a oneshot service to change min and max clocking to min1500MHz and max2100MHz(my GPU readings). Which commands to run and more explanation in the new .nix file. Made it a bit more modular.
PS. Just posting this for anyone having simillar issue. If the post is old at some time in the future to not be afraid and DM me if help needed, lets solve this together :)
So if I were to switch from arch to nix, or dual boot arch and nix, would I need to reinstall my steam games? Most of them are installed on another drive, if I just set that folder to be a steam install path on nixos, would the games still work?
I updated to the 24.11 channel approximately 45 days ago. A few days later I changed to unstable. Everything seemed to be going smoothly for the next week, or two. Then approximately 30 days ago I had a failure to update the system. The error message was as follows:
error: getting attributes of path '/nix/store/2kpqcxbiga8a9hsxplxgzcklv5nvcmk7-perl5.40.0-Config-IniFiles-3.000003': No such file or directory
I understand that this is a tool that is used to process *.ini files, but that's about all I know.
I haven't had much time to deal with it and I also haven't gotten very far. I can confirm that there is, in fact, no such folder in the /nix/store folder. I can not account for why this folder should be missing. I'm also not sure in which package this file could be found, nor how to install it since I'm no longer able to update the system. I've tried changing channels, hoping that it would provoke a reinstall of any missing packages, but that didn't help. I also can not roll the system back. I have five, or six older 24.11 generations, but I am not able to boot into any of them. I no longer have any 24.05 generations available to me.
I've been running NixOS for less than a year and until now I haven't had any problems, so my NixOS diagnostic skills are virtually nonexistent. I've resigned myself to reinstalling, so I've just made a fresh backup of my personal files. But, before I do that, I thought that I'd reach out one more time before I reinstall.
The full update output from the terminal, including the aforementioned error, can be found here:
Any suggestions would be greatly appreciated!
Hi all,
I've got a problem trying to rebuild I haven't seen before, and my google fu is letting me down.
> thread 'keep_unrelated_files_on_esp' panicked at systemd/tests/gc.rs:118:5:
> assertion failed: output1.status.success()
>
>
> failures:
> delete_garbage_kernel
> keep_only_configured_number_of_generations
> keep_unrelated_files_on_esp
>
> test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.80s
>
> error: test failed, to rerun pass `-p lzbt-systemd --test gc`
Has anyone seen this or know how I can investigate it further?
On my test installation of NixOS, in the system-wide /etc/bashrc, there is an alias defined that I want to remove, one I want to alter, and then I have a few aliases that I want to add.
In a normal Linux distro, I could just modify /etc/bashrc to my liking, but on NixOS it is read only. What is the best way to make the changes I want?
I have already set up jellyfin, and it is reachable in lan but when I try to acces using nginx I get an 404.
services.nginx.virtualHosts."sam.lan" = {
locations."/jellyfin" = {
proxyPass = "http://127.0.0.1:8096";
proxyWebsockets = true;
};
};
I have the module enabled, the 80 opened and de dns configured to redirect sam.lan to the static ip of the server.
I'm trying to package frame0 for nixos (my first package) and currently this is what I've got for my derivation so far:
{ stdenv
, fetchurl
, binutils
, libarchive
, gtk3
, nss
, libnotify
, libXtst
, xdg-utils
, at-spi2-core
, mesa
, libdrm
, libxcb
, libGL
, alsa-lib
, libGLU
, vulkan-loader
}:
stdenv.mkDerivation rec {
name = "frame0";
version = "1.0.0~beta.8";
src = fetchurl {
url = "https://files.frame0.app/releases/linux/x64/frame0_${version}_amd64.deb";
hash = "sha256-3vDG0Yw0OUdwjZiRfwULLVhqTI8HrJcSooW0eyQup9g=";
};
nativeBuildInputs = [ binutils libarchive ];
buildInputs = [
gtk3
nss
libnotify
libXtst
xdg-utils
at-spi2-core
libdrm
mesa
libxcb
alsa-lib
libGL
libGLU
vulkan-loader
];
unpackPhase = ''
# Extract the .deb file using `ar`
ar x $src
bsdtar -xf data.tar.xz
'';
installPhase = ''
mkdir -p $out/bin $out/share
cp -r usr/* $out/
'';
}
This is mostly translated from the AUR PKGBUILD for it.
The binary is not patched but for my own use-case it runs just fine with nix-ld, I just need to understand how I would go about patching the binary so that someone without nix-ld could run it or if that is even possible.
I'm running nixos-24.11 on a Beelink EQ14 Mini Computer. It has an Intel Twin Lake N150 cpu.
My understanding is that I should be able to do hardware transcoding in Plex with this hardware, but I haven't been able to get it to work.
Here is my current config:
services.plex = {
enable = true;
openFirewall = true;
user = "--redacted--";
};
hardware.graphics.enable = true;
hardware.graphics.extraPackages = with pkgs; [
intel-media-driver
intel-gpu-tools
vpl-gpu-rt
libvdpau-va-gl
];
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD";
I have a plex pass, and these are the options I have in the Plex settings page:
I've tweaked the configuration a bunch, but I'm not able to get the "(hw)" annotation in the "Now playing" list:
What am I missing?
Update: I was able to verify hardware transcoding works using ffmpeg. I gave up on setting up Plex directly on NixOS, and instead used docker. I mapped the /dev/dri device to the container and it worked fine.
I have Alpaca installed on a nix-env, the only problem I have is that my RX 7700xt does not work properly out of the box and I get a notification that it is only using my cpu. I saw there was additionally an ROCm package available on nix but that does not seem to automatically work. From what I read my gpu is not supported officially by ROCm. On the the NixOs wiki there is a way to force it, but that config is only for NixOs and and not nix-env.
Hey all. Not sure how to ask for help or fix this myself.
Can someone try and nix-shell -p barman on 24.11?
It won’t compile for me and not sure where to go to from here.
Hello everyone,
The other day, I was having a rough time—lots of negative energy and emotions. Instead of letting it go to waste, I decided to put it into something productive. So, I finally built a small tool I had been wanting for a while: a "television channel" for Nix packages.
You can check it out here: https://github.com/3timeslazy/nix-search-tv
It's built on top of awesome and fast nix-search package. Right now, it allows you to fuzzy search nixpkgs
, but I’m considering adding support for home-manager and nix-darwin as well.
Also, I would like to say big thanks to the contributors of nix-search
—this project wouldn't exist without their work!
I'm trying to configure greetd to run tuigreet, which in turn needs to run river wm, which in turn needs to run a river config script lol. Managing quotation marks and making sure each "layer" hands the correct raw string to the next is doing my head in. I'd really appreciate some advice or a different approach!
Here's an example of what I'm trying to piece together:
riverctl map normal Super Print spawn "grim"
is a riverctl
command that maps the keys Super
+Print
to execute/spawn the shell command grim
, which takes a screenshot. Note that the quotes are necessary, as spawn
expects a single word argument, which could be a multi-word shell command (Hell, that shell command could itself need quotes). I could type this in my shell verbatim and it would work fine, as there's just one level of quotes to manage.river -c "<shell_command>"
starts river and executes <shell_command>
with /bin/sh -c
(bash in my case) to configure things. The quotes are also necessary here, as river -c
expects a single word argument. <shell_command>
may be a multiline config script, but for now it can be the single command from (1) above. I'm thinking of defining it with a let
binding in my configuration.nix
. I need to start river in this way to keep my river config contained within my configuration.nix
. Else, river looks in specific directories for a config file, which isn't reproducible.services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
user = "greeter";
};
};
};
I've repurposed it into this:
services.greetd = {
enable = true;
settings = {
default_session = {
command = ''
${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd "river -c \"riverctl map normal Super s exit\""
'';
user = "greeter";
};
};
};
This works, but it's hard to manage! What do I do if:
let
binding and consist of multiple lines, while being interpreted correcly?spawn
commands as in (1), which may need further quotes in the shell commands that spawn
runs?Like an onion, there may be countless layers. And like an onion, it makes me cry.
Edit:
Maybe I should do things a little differently. In NixOS, would it be wise to just have a config file for river like I'm supposed to? If I don't use the -c
flag, river looks for $XDG_CONFIG_HOME/river/init
or ~/.config/river/init
. Things would be easier if I just used that config file (in a reproducible NixOS way) for two reasons:
I can mitigate a lot of the headaches with string/quote levels.
tuigreet lets me select a session. If I select "River", it just runs river
without my -c
config commands. It would be neat to take advantage of tuigreet's session selection.
Hello, absolute NixOS newbie here. I'm curious about trying out NixOS for development, but I'm struggling with beginner steps.
I have set up both PHPStorm and PHP in my configuration.nix:
environment.systemPackages = with pkgs; [
php
jetbrains.phpstorm
];
Now I wonder how to set the PHP executable in PHPStorm? Surely it is not the intended way in NixOS to find the cryptic system path where NixOS actually stores PHP, is it? From what I've understood so far in regards to NixOS, I would guess to be able to configure this stuff in the configuration.nix itself or something like that.
Any help is greatly appreciated!