Questions tagged [nixos]

NixOS is a Linux distribution that uses the Nix package manager.

NixOS is a Linux distribution built on top of the Nix package manager. It uses declarative configuration.

29 questions
7
votes
2 answers

How should nftables rules using hostnames be rewritten to deal with multiple addresses?

I have this nftables rule: ip daddr { "0.nixos.pool.ntp.org", "1.nixos.pool.ntp.org", "2.nixos.pool.ntp.org", "3.nixos.pool.ntp.org" } udp dport ntp accept comment "Allow NTP traffic for system time" The goal is to allow NTP traffic from a host…
6
votes
2 answers

Recover from `nixos-rebuild test` without a reboot

Is there a way to revert to the previous (or at least "current") configuration after nixos-rebuild test without rebooting? Per the nixos-rebuild manual: test Build and activate the new configuration, but do not add it to the GRUB…
aij
  • 203
5
votes
2 answers

How do I set up a nix-shell script for lua?

I am trying to set up a nix-shell script which contains lua 5.2, the lua sockets library, and a few other libraries. However, when I load the shell, only Lua ends up being present. with import {}; stdenv.mkDerivation rec { name =…
4
votes
1 answer

how to execute a bash script in nixos

I am trying to create a .nix file that installs nvm First I tried to add inside configuration.nix : system.activationScripts = { dotfiles = pkgs.lib.stringAfters [ "users" ] '' curl NVM_URL | bash '' } } But it complained bash and…
Ant
  • 203
4
votes
1 answer

Is there any way to output all configuration options in my configuration.nix?

I want to set up jetty on nixos. I can install it through system.systemPackages but I can't get it to autostart (services.jetty isn't defined) I don't want to ask every option here, so I want to know if there is documentation or a way to print every…
nixos
  • 53
3
votes
1 answer

NixOS reproducible users and packages?

I'm new to NixOS and trying to learn its concepts. One of the reasons I'm excited about it is I'm hoping it will be able to give me a reproducible system configuration, similar to using Ansible for localhost. However, I am not sure how to achieve…
3
votes
1 answer

Why are Nix programs not able to resolve mDNS names when native programs are?

My native programs (on Fedora) are able to resolve mDNS / Avahi / zeroconf names, like so: $ ping felonyspork.local -c 1 PING felonyspork.local (192.168.88.169) 56(84) bytes of data. 64 bytes from 192.168.88.169 (192.168.88.169): icmp_seq=1 ttl=64…
2
votes
0 answers

how should I proceed debugging NFS4+Kerberos?

I have a working NFS4 setup. The server is called bluebox.lan and it exports: /mnt bluescreen.lan(rw,no_root_squash,crossmnt) The client is called bluescreen.lan and it is able to mount bluebox's nfs using: mount -t nfs4 -o nfsvers=4.2…
2
votes
1 answer

How do I configure the hostname for the GitLab NixOS service?

I am trying to deploy a new GitLab instance on NixOS 20.09.1632.a6a3a368dda (Nightingale). I have this rather minimal configuration.nix: { modulesPath, ... }: let host = "example.org"; adminEmail = "admin@example.org"; in { imports = […
1
vote
1 answer

`nixos-rebuild switch` fails with "No space left on device"

I keep filling up /boot with old kernels, at which point nixos-rebuild switch --upgrade will download a bunch of derivations only to eventually fail when installing the new kernel (or initrd) because there is insufficient space on /boot. One option…
aij
  • 203
1
vote
1 answer

getting ipv6 via radvd/dhcpd6 in an LXC guest working

what i want my setup has a dynamic amount of LXC containers and therefore i need some dynamic ipv6 address allocation. the interface brNC-internet is a simple bridge which is mapped into the LXC based container. i need a way to assign ipv6 addresses…
qknight
  • 201
1
vote
0 answers

What caused automatic shutdown via systemd after failure

On a system with SystemD running NixOS running via qemu I have seen this log: Aug 09 01:01:43 myhost systemd[1]: Looping too fast. Throttling execution a little. Aug 09 01:02:01 myhost systemd[1]: Looping too fast. Throttling execution a little. Aug…
frlan
  • 593
1
vote
1 answer

How to get nixos configuration.nix to configure nginx?

In my configuration.nix, it says services.nginx.enable=true; services.nginx.httpConfig="a"; (I tried a normal file and empty string and neither worked) upon running nixos-rebuild switch, it says that the server was started, but curl localhost…
nixos
  • 53
1
vote
1 answer

Can create and modify but not delete files on Time Machine SMB Share backed by SSHFS

I am using NixOS 24.11 and the path of the SMB share is an SSHFS mount point. The following configuration works, I can connect, create, modify, and delete files, but the share does not appear as a valid Time Machine destination. services.samba = { …
1
vote
1 answer

Can't connect to UDP service running in k3s and exposed via nodePort

I am trying to expose a UDP service (tftp) through a k3s nodePort but can't seem to connect. The TCP service work fine, but the UDP service doesn't seem to be exposed. The deployment lists the ports: ... ports: - containerPort: 3000 -…
1
2