Nix / NixOS

1465 readers
2 users here now

Main links

Videos

founded 1 year ago
MODERATORS
76
77
78
79
80
20
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]
 
 

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

April fool's!

81
82
 
 

Basically the title. I have Nixos running on a server that runs completely headless and while playing around today, I noticed that the rebuild takes longer than expected and apparently that's because firefox gets compiled.

Now, I don't have any GUI installed, and even if I had, I don't see a reason to compile FF from source.

My packages are just Jellyfin, Samba, Gitea, Nextcloud, virt-manager. None of these should depend on FF.

83
30
Nix 2.21 released (releases.nixos.org)
submitted 5 months ago by [email protected] to c/[email protected]
84
 
 

I have found those options for setting up iscsi, but since I am new to nixos (started yesterday) I don't have any idea how to configure the configuration.nix file to setup iscsi.

I already installed open-iscsi but it doesn't work on nixos it seems

85
 
 

Hi! It's my first day with nixos. I tried to compile a rust project. To do so, I used a nix-shell with the content from here: https://nixos.wiki/wiki/Rust with the "Installation via rustup" option.

Unfortunately the compilation fails:

$ cargo check
   Compiling libc v0.2.151
   Compiling proc-macro2 v1.0.73
   Compiling serde v1.0.193
    Checking once_cell v1.19.0
   Compiling thiserror v1.0.53
error: linker `aarch64-linux-gnu-gcc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `proc-macro2` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `serde` (build script) due to 1 previous error
error: could not compile `libc` (build script) due to 1 previous error
error: could not compile `thiserror` (build script) due to 1 previous error

I run NixOS 23.11 stable on a VM on a Macbook with M1 (arm64) CPU.

Any ideas how to fix that?

86
 
 

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.

87
 
 

After learning how to add an unstable overlay to nixpkgs, being able to override individual service modules from unstable was something that I still struggled with until fairly recently. Hopefully this helps someone else looking to do common-but-not-very-obvious operation.

88
 
 

just realized that one thing that NixOS could use is an update changelog of what packages were updated after running sudo nixos-rebuild switch --upgrade

tbh maybe there's a verbose option that I haven't discovered yet

89
 
 

Wow! Didn't know it'd be that simple.

90
 
 

cross-posted from: https://mander.xyz/post/10671711

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.

91
 
 

I have always been exposed to windows active directory with server controlled logins, server based "home" directories, etc. With the nature of NixOS it seems like it might be easy to deploy something similar by just setting up the configuration.nix as some sort of symlink to one stored on a central server. The only issue would possibly be how to not create home directories on the local machine and instead store them on server. You might be able to make a central passwd file that gets read, but i am not sure just how secure that would be. Thoughts?

92
93
 
 

Creating infrastructure for supporting Bazel remote execution with rules_nixpkgs

94
95
 
 

I'm happy to finally release this flake; it's been on my plate for months but bigger things kept getting in the way.

Let me know here or @[email protected] if you successfully run any interpreter on any system besides amd64 Linux.

96
 
 

Hey, i currently try to learn the nix language and i have a question about recursion. This is my solution for Advent of Code 2015 day 4

let
    input = "abcdef";
    part1 = number:
        if (builtins.substring 0 5 (builtins.hashString "md5" "${input}${builtins.toString number}")) == "00000" then
            number
        else
            part1 (number + 1);
    part2 = "not implemented";

in {"Part 1" = part1 1; "Part 2" = part2;}

since i put the recursive call at the end of the function i assumed it would do some magic or tail call optimization stuff, but it results pretty fast in a stack overflow is there a way to get it working?

97
2
submitted 5 months ago* (last edited 5 months ago) by [email protected] to c/[email protected]
 
 

So i followed the instructions to install virtualbox and added myself to the vboxusers group, but i cant run VMs as a standard user. The GUI message says "VirtualBox kernel driver is not accessible, permission problem" the VM log says "ERROR [COM]: aRC=E ACCESSDENIED (0x80070005) aText={The console is not powered up}"

Someone on mastodon mentioned /dev/vboxdrv and that file is "crw-rw---- root vboxusers". There is also a file /dev/vboxdrvu which is "crw-rw-rw- root root" but changing that to root vboxusers with chown didnt work.

I can run VMs as root just fine. Any thoughts?

Edit: new to NixOS and really enjoying it so far

Edit 2: SOLVED: I had "virtualbox" as a package under "envoronment.systemPackages = with pkgs; [" and wasnt supposed too.

98
 
 

I just switched one of my systems over to NixOS from Arch and so far it seems interesting. One question I had is regarding the nix-shell. So I get the basic concept of it and that it allows creating a shell that has packages installed with that shell making ideal for dev environments. I've even seen talks where the suggest nix-shells over docker/podman, my question is how is persistent data (like databases) handled?

99
100
 
 

While updating home-manager I got a notice that freeimage-unstable-2021-11-01 is marked as unsafe.

Since chances are it's used by something I never use, I'd like to know what I'm using that depends on it... any idea how to do it?

Also.. any idea why I have 4 copies of the freeimage stuff in my /nix/store? (I just run nix-collect-garbage -d and the 4 seem to be actually different):

❱ md5sum /nix/store/*freeimage*/lib/libfreeimage.a
67a0ce1cb5dd562473e27d7c88e8a9bd  /nix/store/6gi6hm57zngqnxb6p5dnxhjjcbr96lrk-freeimage-unstable-2021-11-01/lib/libfreeimage.a
5995e0affbfa28b63da7e997cb4dbe63  /nix/store/09nwykzzksc0zknflsyxyah5b67c2rsn-freeimage-unstable-2021-11-01/lib/libfreeimage.a
67a0ce1cb5dd562473e27d7c88e8a9bd  /nix/store/ikfiv4gpmcpyir7lsj45by653qcnvgyx-freeimage-unstable-2021-11-01/lib/libfreeimage.a
213a408e3c1fbb5dfa4491deebe05984  /nix/store/q2sc85f2hclgwl8m3qdw8rpbs44gzmah-freeimage-unstable-2021-11-01/lib/libfreeimage.a
view more: ‹ prev next ›