Questions tagged [nixos]

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

Filter by
Sorted by
Tagged with
6 votes
2 answers
1k views

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 ...
aij's user avatar
  • 193
5 votes
2 answers
922 views

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 <...
Savanni D'Gerinel's user avatar
4 votes
2 answers
7k views

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" ...
Jean-Paul Calderone's user avatar
4 votes
1 answer
3k views

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 ...
nixos's user avatar
  • 53
3 votes
1 answer
816 views

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 ...
arussell84's user avatar
3 votes
1 answer
5k views

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 ...
Ant's user avatar
  • 193
2 votes
1 answer
618 views

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 ...
Leonora Tindall's user avatar
2 votes
0 answers
922 views

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 ...
Mathijs Kwik's user avatar
1 vote
1 answer
2k views

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 ...
qknight's user avatar
  • 171
1 vote
2 answers
303 views

NixOS - Let's Encrypt certificate is not recognized by Traefik (works in Nginx)

I am trying to run a demo Node.js app on a subdomain using Traefik reverse proxy. I am generating the wildcard Let's Encrypt certificate with the security.acme option. When I import the certificate in ...
protob's user avatar
  • 111
1 vote
1 answer
919 views

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 ...
Mohamed Zouari's user avatar
1 vote
1 answer
793 views

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"; ...
Jean-Paul Calderone's user avatar
1 vote
1 answer
4k views

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 ...
nixos's user avatar
  • 53
1 vote
1 answer
324 views

Systemd doesn't seem to respect After= dependency?

I have a PostgreSQL server (postgresql.service) and a basic shell script (mobilizon-postgresql.service that is run to provide some assertions on the database to a third service (Mobilizon). So ...
erictapen's user avatar
  • 113
1 vote
0 answers
265 views

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]: ...
frlan's user avatar
  • 573
0 votes
1 answer
2k views

`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 ...
aij's user avatar
  • 193
0 votes
1 answer
373 views

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 ...
frlan's user avatar
  • 573
0 votes
0 answers
6 views

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: ....
Mark Grimes's user avatar
0 votes
0 answers
56 views

Linux server stops responding, no video output

I built a Linux server out of commodity hardware and every now and then it stops responding. I can't ssh in, my docker jobs don't respond, and when I plug in a monitor there is no video output until I ...
knpwrs's user avatar
  • 369
0 votes
1 answer
171 views

Start a nix-shell with only the current directory mounted (similar to a container)

I am looking for a way to launch a shell with specific packages installed within, but no unnecessary access to the rest of the system, i.e: Only the current directory (pwd) mounted, no access to ...
P Varga's user avatar
  • 101
0 votes
0 answers
173 views

Nginx can't read files when symlinking folder in /home/user to /var/www

I want to be able to edit my sites files without using sudo, so I symlinked /home/USER/project to /var/www/project with ln -sTf /home/USER/PROJECT /var/www/PROJECT However, Nginx displays 403 ...
Nate's user avatar
  • 1
0 votes
1 answer
252 views

Migration from Nixops 1.7 to 2.0 and <deployment>.nix to nixops.nix

I try to migrate my nixops from version 1.7 to nixops_unstable 2.0.0-pre-7220cbd. After installing nixops_unstable I cannot work with the nixops command anymore: $ nixops deploy -d streaming Traceback ...
Matthias Wimmer's user avatar
0 votes
1 answer
126 views

NixOS starting a daemon process example - is the example broken?

In the python flask example application given on https://nixos.org/guides/dev-environment.html ... Isn't it just killing the daemon process whether it passes the health check or not? Maybe there's ...
bryan hunt's user avatar
-1 votes
1 answer
137 views

Linux confused by identical mounts on different disks after attaching disk

We are having a weird problem when attaching an EBS volume to a running Linux (NixOS in this case) instance (for the purpose of growing the file system on that attached volume; on it is the NixOS root ...
nh2's user avatar
  • 878