-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Issue description
I just wanted networkmanager to know my VPN configuration declaratively. I did this with the following expression:
environment.etc."ETH-VPN" = {
source = ./systemConfigFiles/networkManager/ETHZ-VPN;
target = "NetworkManager/system-connections/ETHZ VPN";
};
with this configuration I got nixos to crash and to create a non bootable generation
Steps to reproduce
when I rebuilded and switched (sudo nixos-rebuild --upgrade switch"), the switch (almost certainly) was completed, however I immediately droped into a login prompt (I guess X just died). Logging in is not possible, as the keyboard doesn't work (ctr+alt+sysrq + reisub) still works
when rebooting, I can choose the new generation. Doing that I, I get a lot of errormessages (see attached image).
My Guess: These errors relate to the fact that several files in /etc are broken.
Fix
When I remove the space in ETHZ VPN , everything works fine
Notes
The NetworkManager/system-connections/ directory already existed, there was even a different vpn in it.
There was no previous VPN with that name and also no file named NetworkManager/system-connections/ETHZ VPN existed.
I tried to create a minimal bug report by replacing these highly custom bug to a more generic one like this:
environment.etc."test" = {
source = ./foo;
target = "NetworkManager/spaced filename";
};
For some reason this doesn't create the same behaviour. It still generates a corrupted generation and switches into it, but it doesn't log me out. Instead various config files in /etc seem to be broken; E.g. when i do
sudo -s
I get /etc/sudoers: syntax error near line 1:
(and the same error for many other lines)
Technical details
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.
these paths will be fetched (0.75 MiB download, 4.33 MiB unpacked):
/nix/store/5hszvi0hczzh25mmsz5rkb9qa758c10p-bash-4.4-p12-dev
/nix/store/9bkj2zjc8jdzwgwdwb5d890hrhrk9d3g-bash-4.4-p12-dev
/nix/store/bkx6rzqciq0sdn1z5liard33ffvv1n3s-bash-4.4-p12-doc
/nix/store/d5ki460cwwydf93f31is95sqpcf334r4-bash-4.4-p12-info
/nix/store/f1rp3j71id6g6zcmiafrksmw1cgydl9k-bash-4.4-p12-doc
/nix/store/l3nz0167a4xhb78ldcjns5p4dwvlm1cw-stdenv
copying path '/nix/store/bkx6rzqciq0sdn1z5liard33ffvv1n3s-bash-4.4-p12-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/f1rp3j71id6g6zcmiafrksmw1cgydl9k-bash-4.4-p12-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/d5ki460cwwydf93f31is95sqpcf334r4-bash-4.4-p12-info' from 'https://cache.nixos.org'...
copying path '/nix/store/5hszvi0hczzh25mmsz5rkb9qa758c10p-bash-4.4-p12-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/9bkj2zjc8jdzwgwdwb5d890hrhrk9d3g-bash-4.4-p12-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/l3nz0167a4xhb78ldcjns5p4dwvlm1cw-stdenv' from 'https://cache.nixos.org'...
- system:
"x86_64-linux" - host os:
Linux 4.15.0, NixOS, 18.03.132535.2ee48415afc (Impala) - multi-user?:
yes - sandbox:
no - version:
nix-env (Nix) 2.0.2 - channels(root):
"nixos-18.03" - nixpkgs:
/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
