[Nix-dev] Configure WiFi networks for NetworkManager in configuration.nix?

Fabian Schmitthenner fabian at schmitthenner.eu
Wed Jan 6 16:03:32 CET 2016


I think you can use

    environment.etc."NetworkManager/system-connections/some-file" = {
      text = "Text of file";
      mode = "0400";
    }

This will copy the file into /etc with appropriate mode at activation
time. See also http://nixos.org/nixos/options.html and search for
environment.etc for further options.

(Of cause other users can still read the original file in the nix store,
so the contents would still be reachable for all users).

Greetings

Fabian

On 01/06/2016 02:26 PM, Vladimír Čunát wrote:
> On 01/06/2016 12:52 AM, Mateusz Czaplinski wrote:
>> NetworkManager expects to have network definitions as chmod 400 files in
>> /etc/NetworkManager/system-connections/ IIRC.
> 
> Files in nix store can't be chmod 400.
> 
> --Vladimir
> 
> 
> 
> 
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160106/47e18a15/attachment.bin 


More information about the nix-dev mailing list