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.

19 questions
5
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
  • 183
  • 6
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

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
  • 1
  • 4
3
votes
1 answer

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…
Jean-Paul Calderone
  • 352
  • 1
  • 4
  • 14
3
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
  • 193
  • 1
  • 9
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…
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…
Mathijs Kwik
  • 121
  • 2
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
  • 161
  • 5
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
  • 563
  • 5
  • 27
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
  • 4
1
vote
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…
1
vote
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 = […
Jean-Paul Calderone
  • 352
  • 1
  • 4
  • 14
1
vote
1 answer

Read files from remote repository using nixOs

I am building a project using the nixOs package system. I have a remote git repo containing different config files. I want to access those files using nix, with out editing the remote repo. The project would access the remote repo with a specific…
0
votes
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
  • 183
  • 6
0
votes
1 answer

How to install Postgis with Osm2pgsql on NixOS

When installing PostGIS on NixOS with an expression like services.postgresql.extraPlugins = [ (pkgs.postgis.override { postgresql = pkgs.postgresql94; }).v_2_1_4 ]; How to add other extensions like Osm2pgsql to it?
frlan
  • 563
  • 5
  • 27
1
2