[Nix-dev] Zoom package?
Has anyone started packaging Zoom (https://zoom.us/) for NixOS? Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PulseAudio
David, On Tue, May 9, 2017 at 2:59 PM, David Izquierdo wrote: > If you run `pulseaudio -k`, does it kill it? No: $ pulseaudio -k E: [pulseaudio] main.c: Failed to kill daemon: No such process But the daemon is running as me: $ ps aux | grep pulseaudio user 2572 0.0 0.0 490632 10540 ?Sl 14:55 0:00 /nix/store/ a72z0gasiv1145ygyijzgdra921pkk60-pulseaudio-10.0/bin/pulseaudio --start --log-target=syslog user 2604 0.0 0.0 118264 5756 ?S14:55 0:00 /nix/store/ a72z0gasiv1145ygyijzgdra921pkk60-pulseaudio-10.0/libexec/pulse/gconf-helper > Once dead, what does it log if you run `pulseaudio` and then try to use > pavucontrol or other program? I killed it by hand: $ sudo kill 2572 2604 $ mpv foobar.mp3 # plays $ pavucontrol # Works! Going to try a reboot to see if it still works... Back to the previous behavior until I kill them then start up something that uses pulseaudio. Making progress. Thanks David. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PulseAudio
On Tue, May 9, 2017 at 2:32 PM, Sergiu Ivanov wrote: > I suppose you tried rebooting after installing the packages? > Yes. I did that before doing the above actions. I even upgraded to 17.03 (from 16.09) in case that helped. It didn't. > I'm afraid I'm running out of ideas, sorry :-( Off the top of my head, I > don't think the no-longer-available wiki page had many more details > relevant to your situation. > Thanks for your help. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] PulseAudio
Thanks for your prompt reply Sergiu. On Tue, May 9, 2017 at 1:50 PM, Sergiu Ivanov wrote: > What happens if you install pavucontrol and pamixer in a user > environment? > $ nix-env -iA nixos.pavucontrol installing ‘pavucontrol-3.0’ building path(s) ‘/nix/store/vbcjij1kyljx6psi55c3grdmgp04cwm2-user-environment’ created 1234 symlinks in user environment $ pavucontrol ** (pavucontrol:8551): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files Within the pavucontrol window that pops up it says "Connection to PulseAudio failed". $ nix-env -iA nixos.pamixer installing ‘pamixer-1.3’ building path(s) ‘/nix/store/w21ijfx76xkf2smw6xk1hgvmp9b2h2s0-user-environment’ created 1235 symlinks in user environment $ pamixer --list-sinks Connection error Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] PulseAudio
I am having trouble getting PulseAudio to work. I added the following to configuration.nix, executed nixos-rebuild switch, and rebooted: hardware.pulseaudio = { enable = true; package = pkgs.pulseaudioFull; }; environment.systemPackages = with pkgs; [ pamixer paprefs pavucontrol ]; Executing pamixer gives "Connection error". pavucontrol also fails to connect to the daemon. But it appears to be running: $ ps aux | grep pulse user 2720 0.1 0.0 492636 10516 ?Sl 12:34 0:04 /nix/store/k8q0bcyyy0x7r0s5l65njgjp6w14yzyz-pulseaudio-9.0/bin/pulseaudio --start --log-target=syslog user 2864 0.0 0.0 115656 5596 ?S12:34 0:00 /nix/store/k8q0bcyyy0x7r0s5l65njgjp6w14yzyz-pulseaudio-9.0/libexec/pulse/gconf-helper Trying mpv gives "ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused" which indicates that the daemon is refusing to connect but I do get sound anyway. I tried to go to the wiki https://nixos.org/wiki/PulseAudio but it has been shut down and says I should check the manual but the manual has nothing on PulseAudio. (I know that the community is trying to move the documentation to the manual but removing access to the wiki before the manual is complete yanks the rug out of under people.) Can someone give me a step by step process for getting PulseAudio working properly? (Longer term, I want to get my Bluetooth headphones to work so if you happen to have that also...) Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Modular config and lists
Hi Layus, On Mon, Apr 24, 2017 at 3:54 PM, Layus wrote: > Have you tried this ? > > > ```nix > { config, pkgs, ... }: > { > virtualisation.libvirtd.enable = true; > users.users.myuser.extraGroups = [ "libvirtd" ]; > } > ``` > > This should seamlessly integrate with other options. By default lists will > be concatenated, not overwritten. > No I didn't. I was assuming that the lists would conflict. I tried it and it works. (Obviously my nix understanding is still being formed.) Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Modular config and lists
I separated my configuration into different files by functionality. The goal is to keep like things together and import them as needed to create the final configuration.nix. My virtualization.nix currently contains: { config, pkgs, ... }: let groups = config.users.users. myuser>. extraGroups; in { virtualisation = { libvirtd.enable = true; }; users.users. myuser .extraGroups = groups ++ [ "libvirtd" ]; } but nixos-rebuild gives "infinite recursion encountered". How do I set things up so that myuser's group membership will include not only what is defined in extraGroup somewhere else but also "libvirtd"? Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] dnsmasq fails to start
On Wed, Mar 22, 2017 at 3:09 AM, Bjørn Forsman wrote: > Have you tried restarting the machine after adding that config? I > think e.g. avahi misbehaves on the first "nixos-rebuild switch" due to > some dbus issue (fixed by rebooting), perhaps this is like that? > Thanks Bjørn. That solved the problem. dnsmasq is working now. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] paths in user's i3 configs broken by upgrade
I just upgraded from an early 17.03 beta to 17.03 and the $mod+d key combination for invoking dmenu no longer works in i3. The problem is that the paths to dmenu in the ${i3}/etc/config* files are hard coded when the config files are created and propagated to the user's .config/i3/config file by i3-config-wizard upon first logging in. At some point in the future, an upgrade causes the config file to point outside the current-system closure. This is certainly an error but won't be obvious until the path to the obsolete dmenu is garbage collected. In my case, I upgraded from 16.09 to 17.03 beta and then 17.03. Things seemed to be working so I garbage collected my original 16.09 installation which broke $mod+d as the path to the original 16.09 dmenu was now dangling. Instead of: bindsym $mod+d exec /nix/store/04sx6lx7hssid7a6iwdbdvxbkp25xsx1-dmenu-4.6/bin/dmenu_run I think it should be to be: bindsym $mod+d exec /run/current-system/sw/bin/dmenu_run That way, the path is still within the current-system closure and is guaranteed to exist if dmenu is installed. I believe the place to make the change is in the post fixup (lines 33-38 in nixpkgs/pkgs/applications/window-managers/i3/default.nix). I would be glad to issue a PR but I don't know how the substitution should change to result in /run/current-system/sw instead. Note: the path for i3status is also hard-coded and shouldn't be. Since there wasn't an update to i3status, it continues to work but is still wrong because it points outside of the current-system closure. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Help wanted with Nixos on ZFS in an encrypted LUKS volume
On Sun, Apr 2, 2017 at 3:06 PM, wrote: > Could some of you please take a look? I documented most of it in the gist > here: https://gist.github.com/awesomefireduck/ > ffea6517042af87b8b7ef6ea1c7d50e3 . If you need more information I'd be > happy to supply it. > I have seen this before when I specified the wrong (non-LUKS) partition in initrd.luks.devices but I don't see anything obviously wrong with your configuration. Here is how I typically create a LUKS+ZFS+NixOS installation. Hopefully this helps you identify what is going wrong. ### Create a LUKS+ZFS+NixOS installation ## I use /dev/sdaX instead of /dev/disk/by-id/xx-partX for convenience but you should use by-id as it won't change when disks come and go. # sgdisk -Z -n1:0:+512M -t1:EF00 -c1:EFI -n2:0:0 -t2:E800 -c2:LUKS -p /dev/sda # cryptsetup luksFormat --key-size 512 --hash sha512 --verify-passphrase /dev/sda2 # cryptsetup open /dev/sda2 cdisk # zpool create -o ashift=12 -o altroot=/mnt -m none -O atime=off -O relatime=on -O compression=lz4 rpool /dev/mapper/cdisk # take note of hostid # zfs create -o mountpoint=none rpool/root # zfs create -o mountpoint=legacy rpool/root/nixos # zfs create -o mountpoint=legacy rpool/home # zfs create -o compression=off -V 1G rpool/swap # mkfs.vfat -F 32 -n EFI /dev/sda1 # mkswap -L SWAP /dev/zvol/rpool/swap # mount -t zfs rpool/root/nixos /mnt # mkdir /mnt/boot # mount /dev/sda1 /mnt/boot # mkdir /mnt/home # mount -t zfs rpool/home /mnt/home # swapon /dev/zvol/rpool/swap # zpool set bootfs=rpool/root/nixos rpool # nixos-generate-config --root /mnt # cd /mnt/etc/nixos # mv configuration.nix configuration.nix.orig # cat <configuration.nix { config, pkgs, ... }: { imports = [ ./hardware-configuration.nix ]; # Use the systemd-boot EFI boot loader. boot = { loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; supportedFilesystems = [ "zfs" ]; initrd.luks.devices = [ { name = "cdisk"; device = "/dev/sda2"; } ]; }; networking = { hostName = "nixos"; hostId = "05f35ae3"; # use hostid SPL picked above }; system.stateVersion = "16.09"; } # EOF # time nixos-install 2>&1 | tee install.log # 9m0.236s # reboot Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] dnsmasq fails to start
[Sorry for the earlier empty message...] I am trying to use dnsmasq per the manual: services = { dnsmasq = { enable = true; servers = [ "208.67.222.123" "208.67.220.123" ]; }; }; The daemon fails to start: Mar 21 20:41:25 foobar systemd[1]: Starting Dnsmasq Daemon... Mar 21 20:41:25 foobar dnsmasq-pre-start[30845]: dnsmasq: syntax check OK. Mar 21 20:41:25 foobar dnsmasq[30856]: dnsmasq: DBus error: Connection ":1.34" is not allowed to own the service "uk.org.thekelleys.dnsmasq" due to security policies in the configuration file Mar 21 20:41:25 foobar systemd[1]: dnsmasq.service: Main process exited, code=exited, status=5/NOTINSTALLED Mar 21 20:41:25 foobar systemd[1]: Failed to start Dnsmasq Daemon. Mar 21 20:41:25 foobar systemd[1]: dnsmasq.service: Unit entered failed state. Mar 21 20:41:25 foobar systemd[1]: dnsmasq.service: Failed with result 'exit-code'. I have been unsuccessful in figuring out what I am doing wrong. It appears to be something to do with Dbus policy. Anyone running dnsmasq that can give me pointers? Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] dnsmasq fails to start
-- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] nixos-rebuild switch error
On Tue, Mar 7, 2017 at 5:09 AM, Linus Heckemann wrote: > This failure is caused by a flaky internet connection, so it makes sense > that trying again would fix it. Nothing to be concerned about, besides > perhaps the poor UX, making it very unclear what the actual cause of the > failure is :) > Or when Cloudfront (Amazon), which hosts cache.nixos.org, has problems as it did a week ago in my region. DNS was up and down throughout the day (as was the storage itself). The problem went away when Amazon fixed the problem. The frustration of last week brings to mind a quotation from Leslie Lamport: "A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable." (In my case not quite unusable but it was a pain as I was attempting to install on a new machine.) Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] NixOS 16.09 and Firefox Nightly
Graham, On Sun, Mar 5, 2017 at 10:16 AM, Graham Christensen wrote: > Can you confirm that the version of Firefox you're running matches the > currently available, stable, Firefox? > It is indeed. Going to the Firefox home page ( https://www.mozilla.org/en-US/firefox/new/) tells me "Congrats! You’re using the latest version of Firefox." Sorry for the confusion. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] NixOS 16.09 and Firefox Nightly
I thought that 16.09 is the stable release but Firefox Nightly was installed when I upgraded yesterday. No idea how stable Nightly is but according to https://www.mozilla.org/en-US/styleguide/identity/firefox/channels/, it is the one of the least stable of the Firefox builds. I know that some like to track the latest and greatest but I would prefer that there be a stable release where experimental or "nightly" builds are guaranteed to be absent. (I left Ubuntu and went back to Debian years ago for this very reason.) ;Please make the current release as stable as possible (with only security and serious bug fixes). Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Collisions
I am having a bunch of collisions between files in different packages: collision between `/nix/store/0n3z27bqv701g6rziqvr75nkixhsbnx1-traceroute-2.1.0/bin/traceroute' and `/nix/store/g4jyf4l8zg6rs0mj01h4cm16vq43655m-inetutils-1.9.4/bin/traceroute' collision between `/nix/store/bbx92cl3rj4k5vyicsiqjycrf799v5qh-iputils-20151218/bin/ping6' and `/nix/store/g4jyf4l8zg6rs0mj01h4cm16vq43655m-inetutils-1.9.4/bin/ping6' collision between `/nix/store/bbx92cl3rj4k5vyicsiqjycrf799v5qh-iputils-20151218/bin/ping' and `/nix/store/g4jyf4l8zg6rs0mj01h4cm16vq43655m-inetutils-1.9.4/bin/ping' collision between `/nix/store/0csldllszg77wyrqzj4kn042pnfjci1v-net-tools-1.60_p20120127084908/bin/ifconfig' and `/nix/store/g4jyf4l8zg6rs0mj01h4cm16vq43655m-inetutils-1.9.4/bin/ifconfig' collision between `/nix/store/0csldllszg77wyrqzj4kn042pnfjci1v-net-tools-1.60_p20120127084908/bin/dnsdomainname' and `/nix/store/g4jyf4l8zg6rs0mj01h4cm16vq43655m-inetutils-1.9.4/bin/dnsdomainname' collision between `/nix/store/0csldllszg77wyrqzj4kn042pnfjci1v-net-tools-1.60_p20120127084908/bin/hostname' and `/nix/store/g4jyf4l8zg6rs0mj01h4cm16vq43655m-inetutils-1.9.4/bin/hostname' collision between `/nix/store/0csldllszg77wyrqzj4kn042pnfjci1v-net-tools-1.60_p20120127084908/share/man/man1/dnsdomainname.1.gz' and `/nix/store/g4jyf4l8zg6rs0mj01h4cm16vq43655m-inetutils-1.9.4/share/man/man1/dnsdomainname.1.gz' collision between `/nix/store/0csldllszg77wyrqzj4kn042pnfjci1v-net-tools-1.60_p20120127084908/share/man/man1/hostname.1.gz' and `/nix/store/g4jyf4l8zg6rs0mj01h4cm16vq43655m-inetutils-1.9.4/share/man/man1/hostname.1.gz' In the first case, uninstalling the traceroute package, which only has the traceroute command, and leaving inetutils, which has traceroute and other commands, will solve the problem. But what about the need to have both net-tools and inetutils installed to get all the commands in both packages at the same time? What about iputils and inetutils? I searched the archives and found "[Nix-dev] collision detection" http://lists.science.uu.nl/pipermail/nix-dev/2004-November/08.html. But I didn't see a resolution to the problem. What is the correct way to solve this? Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Accessing cache.nixos.org
On Thu, Mar 2, 2017 at 10:53 AM, Mark Gardner wrote: > I have been having a lot of failures installing and rebuilding lately. The > usual symptom is "", often 6 ("could not resolve host"). > > For example here are some of the errors I am seeing as I attempt an > installation (over and over again): > - download-from-binary-cache.pl: could not download from ' > http://cache.nixos.org/nix-cache-info' (Curl error 6) > - curl: (6) Couldn't resolve host "cache.nixos.org' > - download of 'https://cache.nixos.org/nar/nar.xz' failed: No such > file or directory > - could not download '/nix/store/...-sudoers' from any binary cache > > Two days ago the problem could be traced to cloudfront.net (AWS > US-East-1) having problems, but I don't know why the problems yesterday and > today. Anyone know why? Anything I can do about it? Any work arounds? This > is stopping me dead in the water... > I found the problem. My office has a single wired port with the computer daisy chained off the VOIP phone. Plugging the computer directly, bypassing the phone, seems to solve the problem. I'll have to have tech support take a look into it. Sorry to have cluttered up the list. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Accessing cache.nixos.org
I have been having a lot of failures installing and rebuilding lately. The usual symptom is "", often 6 ("could not resolve host"). For example here are some of the errors I am seeing as I attempt an installation (over and over again): - download-from-binary-cache.pl: could not download from ' http://cache.nixos.org/nix-cache-info' (Curl error 6) - curl: (6) Couldn't resolve host "cache.nixos.org' - download of 'https://cache.nixos.org/nar/nar.xz' failed: No such file or directory - could not download '/nix/store/...-sudoers' from any binary cache Two days ago the problem could be traced to cloudfront.net (AWS US-East-1) having problems, but I don't know why the problems yesterday and today. Anyone know why? Anything I can do about it? Any work arounds? This is stopping me dead in the water... Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Best Practices on Modularizing Configuration.nix?
Now that I am putting NixOS on more and more machines, I would like to modularize and share parts of the config to maximize reuse and ensure uniformity. My approach is to consider the sub-config files as traits or roles and combine them together to create configuration.nix for a specific machine, like this: - cfg/common.nix # common config - cfg/desktop.nix # xorg and related - cfg/laptop.nix # related to all laptops - cfg/work.nix # work location related ... - cfg/mylaptop.nix # specific laptop related I import from these to make up configuration.nix. For example, on my laptop, configuration.nix contains: --- { config, pkgs, ... }: { imports = [ ./hardware-configuration.nix ./cfg/mylaptop.nix ./cfg/common.nix ./cfg/desktop.nix ./cfg/laptop.nix ./cfg/work.nix ]; } --- So far, this seems like a good approach. Except that each machine has its own configuration.nix that I would like to keep in the git repository too but of course I can't have different top level files with the same name. To solve this, I could moved the current configuration.nix inside of cfg (as cfg/mylaptop.cfg.nix perhaps) or merge with the existing cfg/mylaptop.nix then making configuration.nix a symlink to it. That way the only thing to do by hand is create the symlink to select a particular configuration. Is this reasonable? Is there a better way to do it? How do you modularize your configuration and put it into a repo such that you can easily create a configuration for a new machine (and put it in the repo too) without a lot of hand work? Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Auto upgrade
Curiously, upgrading just broke something... I triggered the upgrade manually. Everything seemed to go fine. But then chromium could not connect to any google.com web pages with a ERR_SSL_PROTOCOL_ERROR. (It connected to everything else just fine.) Turns out they shipped with a new experimental variable (maximum TLS version=default) which defaults to TLS 1.3. (See https://bugs.chromium.org/p/chromium/issues/detail?id=693943.) Going to chrome://flags and switching it to TLS 1.2 enabled me to go to their web sites again. I wonder why they added that to the "stable" branch instead of an experimental branch? Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Auto upgrade
How stable is my system likely to be if I set "system.autoUpgrade.enable = true;" if I am on the stable channel (16.09)? How likely will a it be that an upgrade will cause problems? Do I even need to worry? Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] How to ensure that a directory exists via configuration.nix
On Fri, Feb 10, 2017 at 11:11 AM, David Izquierdo wrote: > Is there any reason not to use `mkdir -p`, to spare yourself the if? Didn't think of it...? :-) Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] How to ensure that a directory exists via configuration.nix
Once again, thanks Layus! For the benefit of others, here is what I put in my configuration.nix: system.activationScripts = { mnt = { text = ''if [ ! -d /mnt ] ; then mkdir /mnt; fi"; deps = []; }; }; Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] How to ensure that a directory exists via configuration.nix
Thanks layus. I spent several hours looking for the answer but never looked at the system.activationScripts option. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] How to ensure that a directory exists via configuration.nix
I have searched the manual and options, as well as the Internet, and have not found how to specify in configuration.nix that a directory should exist, in this case /mnt, creating it if not. One might put "if [ ! -d /mnt ] ; then mkdir /mnt; fi" in rc.local. What is the NixOS way to do this (or anything else that one might put in rc.local)? Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Remapping Console Key Bindings
I ended up taking a different approach: i18n.consoleUseXkbConfig = true; services.xserver.xkbOptions = "ctrl:nocaps"; This seems to be working just fine. (I don't have caps lock anymore but it is used infrequently so I am OK with that.) Thanks everyone for their help. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Remapping Console Key Bindings
On Sun, Jan 29, 2017 at 9:24 AM, Rodney Lorrimar wrote: > I just realised that the previous advice doesn't work very well after a > reboot (no keys work except control). > I got bitten by that one. I could not type in my password to decrypt the disk before NixOS could boot. I am thankful for rollback! :-) > A better way is: > 1. dumpkeys > /etc/nixos/keys.map > 2. Edit keys.map and change keycode 58 from Caps_Lock to Control. > 3. In configuration.nix: i18n.consoleKeyMap = ./keys.map; > This makes sense. I will try it when I get home. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Remapping Console Key Bindings
On Sat, Jan 14, 2017 at 1:32 AM, Rodney Lorrimar wrote: > Hi Mark, > > This is what I do for caps lock as control key: > > # configuration.nix > i18n.consoleKeyMap = (pkgs.writeText "keys.map" '' > keymaps 0-255 > keycode 58 = Control > ''); > > It works for the US keyboard layout. If you use another layout, you > might want to edit the output of dumpkeys ("kbd" package) yourself, and > load that file as i18n.consoleKeyMap. > Thank you Rodney. That is exactly what I needed. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Remapping Console Key Bindings
On Thu, Jan 5, 2017 at 1:52 PM, stewart mackenzie wrote: > services.xserver.xkbOptions = "grp:alt_space_toggle, ctrl:swapcaps"; > Thank you for the quick response. That works for X11 but not for a virtual console. It looks like also setting i18n.consoleUseXkbConfig = true should make it work for console as well but it doesn't. (I am not sure what it does...) Thus, I am still at a loss on how to remap the keys on the console (short of copying the existing console keymap, modifying it as per the sed commands in the original email, and setting i18n.consoleKeymap = ). Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Remapping Console Key Bindings
I have been unable to figure out what to put in configuration.nix to implement the behavior I am used to under Debian. The contents of /etc/kdb/remap are sed commands for remapping the CapsLock key to Control and the right Control key to CapsLock: # This turns caps lock into control s/keycode 58 = Caps_Lock/keycode 58 = Control/; # This turns right control into caps lock s/keycode 97 = Control/keycode 97 = Caps_Lock/; What is the best way to do that for NixOS? Mark ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Usability: Nixpkg > NixOS
On Thu, Dec 15, 2016 at 6:30 AM, zimbatm wrote: > The nixos.org website for example starts with NixOS and then the user has > to backtrack to the other parts of the ecosystem. I think it's confusing > and a lot of people don't get that it's more than an operating system. They > are missing on all the goodness about the cross-distro packaging system > capabilities that makes nixpkg appealing. > Starting with nixpkg and then talking about NixOS causes the same problem but in reverse. As an example, I came to the Nix community as the result of NixOS, not nixpkg. I am not sure I would have been attracted to the community if nixpkg was the entry point. A better idea in my opinion is to have separate sites dedicated to each and have them refer to each other. That way no matter which direction a person comes at it, they will be able to find the other. And each web site can be focused on it's individual message. > The other issue is with the term "nix" because it's a common search word. > "*NIX" always comes up, which is the abbreviation used to describe all the > flavors of UNIX. I think it's desirable to get away from that term in our > communication > . > I haven't had a problem with search but that is because my entry into the community was through "nixos" which isn't a common term. I can see how "nix" could cause problems. Does that make sense? I know that it's easy to get into un-ending semantic > battles but I think it's important to use the right term. Selecting the > right words helps a lot with comprehension. In some sense it's a bit like > go vs golang. "Go" is used in verbal communication and "golang" to help > search. > Just like "Go" -> "golang", we can promote "Nix" -> "nixpkg". > I bought the nixpkg.com domain just in case and am happy to transfer it > to the nix foundation. > Is there any reason we shouldn't use nixpkg.org in parallel to nixos.org? Regards, Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] NixOS UEFI+LUKS+LVM or UEFI+LUKS+ZFS
I am new to NixOS. I definitely like what I have seen so far. Thank you. I would like to encrypt the root partition with LUKS upon which LVM or ZFS would provide /, swap, /home etc. I used https://nixos.org/wiki/ Encrypted_Root_on_NixOS and https://bluishcoder.co.nz/2014/05/14/installing-nixos-with- encrypted-root-on-thinkpad-w540.html as inspiration in my experiments in Vbox. Here is how I set up the disk for the UEFI+LUKS+LVM case: parted /dev/sda mktable gpt sgdisk -n1:1M:+1M -t1:EF02 -c1:GRUB /dev/sda sgdisk -n2:2M:+512M -t2:EF00 -c2:BOOT /dev/sda sgdisk -n3:0:0 -t3:8E00 -c3:LUKS /dev/sda cryptsetup luksFormat /dev/sda3 cryptsetup luksOpen /dev/sda3 enc-pv pvcreate /dev/mapper/enc-pv vgcreate vg /dev/mapper/enc-pv lvcreate -L 1G -n swap vg lvcreate -l 1662 -n root vg # lvcreate -L 40G vg -> 1662 extents mkfs.msdos -F32 -n BOOT /dev/sda2 mkfs.jfs -L ROOT /dev/vg/root mkswap -L SWAP /dev/vg/swap mount /dev/vg/root /mnt mount /dev/sda2 /mnt/boot swapon /dev/vg/swap Here is my configuration.nix: { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; boot.loader.grub.enable = true; boot.loader.grub.version = 2; boot.loader.grub.device = "/dev/sda"; boot.initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda3"; preLVM = true; } ]; networking.hostName = "nixos"; system.stateVersion = "16.03"; } When I rebooted after installation, it seems to hang after prompting for the LUKS password. I have searched the mailing list archives and can't find anything that indicates where it is going wrong. Does anyone have a configuration.nix that combines LUKS with LVM? Or with ZFS? (Ultimately, I want to use ZFS. I am only using LVM to figure out where the problem lies. Apparently the problem is related to LUKS.) Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev