├── Nixos Hackday: 2013-02-19.page ├── Test.page ├── Android SDK.page ├── Java in Firefox.page ├── NixOS and ZFS.page ├── Chromium.page ├── Installation.page ├── GIT workflow.page ├── Hosting providers & NixOs.page ├── Setting up MediaWiki.page ├── Add and debug nix packages.page ├── Mercurial and nixos └── nixpkgs.page ├── How to install NixOS from linux.page ├── InstallingOnVirtualBox.page ├── Nix(OS) on the media.page ├── Nix Hackfest: 2012-07 Augsburg.page ├── Using Profiles for Development Environments.page ├── NixOS Zidanca sprint 2013.page ├── Nixos Hackday: 2013-03-01.page ├── NixOS install fest.page ├── NixOS on Hetzner.page ├── Xorg └── xserver example settings in nix configuration.page ├── Android.page ├── NixOS and LXC.page ├── Wireshark.page ├── Getting Help.page ├── Nix(OS) in production.page ├── Disabling IPv6.page ├── Escape from dependency hell.page ├── Scanners.page ├── Firefox.page ├── Printers.page ├── OpenSSH.page ├── How to get a chroot close enough to LSB for impure binary packages to work.page ├── Ruby.page ├── Network Manager.page ├── TODO - What is missing in the nix community.page ├── Bluetooth.page ├── Main Page B.page ├── Bower2nix.page ├── Docker.page ├── Download all sources.page ├── Modify software.page ├── Nix impurities.page ├── NixOS Filesystem Notes.page ├── Solve GConf errors when running GNOME applications.page ├── HOWTO:idutils.page ├── Enable Browser Plugins.page ├── How to unpack a package's sourcecode.page ├── Fonts.page ├── OpenGrok.page ├── NixOS Modifying Modules.page ├── Rough ideas.page ├── How to add large files to the nix-store.page ├── Nix on Windows.page ├── Lenovo Thinkpad Helix.page ├── Hydra.page ├── Using the ZSH SHELL.page ├── Remote controlling a vm.page ├── Main Page Contributing.page ├── Enable GTK themes in KDE.page ├── Installing Hydra on Ubuntu.page ├── For The Uninitiated.page ├── Install NixOS as OpenVZ guest.page ├── NixOS:Properties.page ├── Real World NixOS Dotfiles.page ├── Project Discussion & Newsletters.page ├── Security Updates.page ├── Keymap.page ├── Nix Hackfest: 2012-08 22nd to 26th Augsburg.page ├── WICD.page ├── Pull request.page ├── Long-term open issues:build determinism.page ├── Nix Hackfest: 2012-07 20th to 22nd.page ├── PulseAudio.page ├── NixOS As OS X Guest.page ├── Samba on nix.page ├── Soft-RAID mdadm ( └── dev │ └── md0), LVM (PVs,VGs,LVs).page ├── Tips for learning the Nix expression language and debugging nix expressions.page ├── Deprecated packages.page ├── Lenovo Thinkpad x200.page ├── Special:Random.page ├── Emacs configuration.page ├── Nix(OS) in the media and presentations.page ├── How to enable subpixel rendering in freetype.page ├── User Reviews.page ├── Hosting providers & NixOS.page ├── How to tweak Linux kernel config options.page ├── Nixpkgs-ruby-overlay.page ├── Error Messages.page ├── How to update when nix is too old to evaluate nixpkgs.page ├── NFS.page ├── Terms and Definitions in Nix Project.page ├── Distributed build.page ├── Anatomy of Nix Package Management.page ├── Installing NixOS in a VirtualBox guest.page ├── Airis N990.page ├── How to watch digital TV (DVB-T).page ├── Nix Wiki.page ├── NixOps:Deploying From Non-Linux OS.page ├── Installing hydra as nixos module.page ├── Nix Installing Packages.page ├── Howto keep multiple packages up to date at once.page ├── TexLive HOWTO.page ├── Main Page Package Manager.page ├── Nix(OS) related repositories and work.page ├── Howto find a package in NixOS.page ├── How to install NixOS from Linux.page ├── Main Page NixOS Desktop.page ├── Wpa supplicant.page ├── Installing VirtualBox on NixOS.page ├── Vimprobable.page ├── NixOS VM tests.page └── KDE.page /Nixos Hackday: 2013-02-19.page: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Test.page: -------------------------------------------------------------------------------- 1 | This is a test. 2 | 3 | -------------------------------------------------------------------------------- /Android SDK.page: -------------------------------------------------------------------------------- 1 | See [Android](/Android). 2 | -------------------------------------------------------------------------------- /Java in Firefox.page: -------------------------------------------------------------------------------- 1 | See [Firefox](/Firefox). 2 | -------------------------------------------------------------------------------- /NixOS and ZFS.page: -------------------------------------------------------------------------------- 1 | See [ZFS on NixOS](/ZFS on NixOS). 2 | -------------------------------------------------------------------------------- /Chromium.page: -------------------------------------------------------------------------------- 1 | See [Enable Browser Plugins](/Enable Browser Plugins). 2 | -------------------------------------------------------------------------------- /Installation.page: -------------------------------------------------------------------------------- 1 | See [Main Page#Installation](/Main Page#Installation). 2 | -------------------------------------------------------------------------------- /GIT workflow.page: -------------------------------------------------------------------------------- 1 | See [Add and debug nix packages](/Add and debug nix packages). 2 | -------------------------------------------------------------------------------- /Hosting providers & NixOs.page: -------------------------------------------------------------------------------- 1 | See [Hosting providers & NixOS](/Hosting providers & NixOS). 2 | -------------------------------------------------------------------------------- /Setting up MediaWiki.page: -------------------------------------------------------------------------------- 1 | See [Setting up MediaWiki & vhosts](/Setting up MediaWiki & vhosts). 2 | -------------------------------------------------------------------------------- /Add and debug nix packages.page: -------------------------------------------------------------------------------- 1 | See [Create and debug nix packages](/Create and debug nix packages). 2 | -------------------------------------------------------------------------------- /Mercurial and nixos/nixpkgs.page: -------------------------------------------------------------------------------- 1 | See [Mercurial and Nix repositories](/Mercurial and Nix repositories). 2 | -------------------------------------------------------------------------------- /How to install NixOS from linux.page: -------------------------------------------------------------------------------- 1 | See [How to install NixOS from Linux](/How to install NixOS from Linux). 2 | -------------------------------------------------------------------------------- /InstallingOnVirtualBox.page: -------------------------------------------------------------------------------- 1 | See [Installing NixOS in a VirtualBox guest](/Installing NixOS in a VirtualBox guest). 2 | -------------------------------------------------------------------------------- /Nix(OS) on the media.page: -------------------------------------------------------------------------------- 1 | See [Nix(OS) in the media and presentations](/Nix(OS) in the media and presentations). 2 | -------------------------------------------------------------------------------- /Nix Hackfest: 2012-07 Augsburg.page: -------------------------------------------------------------------------------- 1 | See [Nix Hackfest: 2012-08 22nd to 26th Augsburg](/Nix Hackfest: 2012-08 22nd to 26th Augsburg). 2 | -------------------------------------------------------------------------------- /Using Profiles for Development Environments.page: -------------------------------------------------------------------------------- 1 | Obsolete: See 2 | [Howto\_develop\_software\_on\_nixos](//Howto develop software on nixos) 3 | 4 | -------------------------------------------------------------------------------- /NixOS Zidanca sprint 2013.page: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 - 26th July 2013 Lokve (near Krsko), Slovenia. 4 | 5 | -------------------------------------------------------------------------------- /Nixos Hackday: 2013-03-01.page: -------------------------------------------------------------------------------- 1 | We're going to meet in Kiperpipa (Cyperpipe) in Ljubljana, Slovenia. 2 | Read more about it at: 3 | 4 | 5 | -------------------------------------------------------------------------------- /NixOS install fest.page: -------------------------------------------------------------------------------- 1 | - 2013-02-16: NixOS Install Fest 2 | - Location: Ljubljana, Slovenia 3 | - Announcement: 4 | 5 | 6 | -------------------------------------------------------------------------------- /NixOS on Hetzner.page: -------------------------------------------------------------------------------- 1 | see 2 | 3 | where i documented it. 4 | 5 | notice: my blog might soon be moved from invalidmagic.wordpress.com to 6 | invalidmagic.de 7 | 8 | -------------------------------------------------------------------------------- /Xorg/xserver example settings in nix configuration.page: -------------------------------------------------------------------------------- 1 | what you could do, is to first start nvidia-settings, and save the 2 | generated file in /tmp, then copy and paste Xorg configfiles into your 3 | configuration.nix file: 4 | 5 | see 6 | 7 | https://svn.nixos.org/repos/nix/configurations/trunk/computer/asus/m60j/jx041v.nix 8 | -------------------------------------------------------------------------------- /Android.page: -------------------------------------------------------------------------------- 1 | Sander van der Burg announced this: 2 | 3 | 4 | Android is very interesting because it runs on many small devices 5 | (tablet pcs, smartphones) - and there is distribution making android run 6 | on x86 architecture: 7 | 8 | -------------------------------------------------------------------------------- /NixOS and LXC.page: -------------------------------------------------------------------------------- 1 | If you want to install ubuntu template you need to install debootstrap 2 | and the lxc. 3 | 4 | You also need to create /var/lib/lxc and /var/cache/lxc directories. 5 | 6 | then if you run 7 | 8 | sudo lxc-create -l DEBUG -n guestname -t ubuntu 9 | 10 | it fails because it can not delelete the /proc from the /var/cache/lxc 11 | 12 | in progress 13 | 14 | -------------------------------------------------------------------------------- /Wireshark.page: -------------------------------------------------------------------------------- 1 | From [[this commit on 2 | wireshark](https://www.mail-archive.com/nix-commits@lists.science.uu.nl/msg09639.html)] 3 | 4 | ` environment.systemPackages = [ pkgs.wireshark ]; ` 5 | 6 | security.setuidOwners = [ 7 | { program = "dumpcap"; 8 | owner = "root"; 9 | group = "wireshark"; 10 | setuid = true; 11 | setgid = false; 12 | permissions = "u+rx,g+x"; 13 | } 14 | ]; 15 | users.extraGroups.wireshark.gid = 500; 16 | 17 | 18 | -------------------------------------------------------------------------------- /Getting Help.page: -------------------------------------------------------------------------------- 1 | a list to all documentation should put here. 2 | 3 | - irc channel \#nixos on irc.freenode.org 4 | ([webchat](http://webchat.freenode.net/?channels=#nixos)) 5 | - [FAQ](//FAQ) 6 | - [Mailinglist](http://lists.science.uu.nl/mailman/listinfo/nix-dev) 7 | - [Mailinglist 8 | archive](http://news.gmane.org/gmane.linux.distributions.nixos) 9 | - [NixOS papers and documentation](http://nixos.org/nixos/docs.html) 10 | - [Nix papers](http://nixos.org/docs/papers.html) 11 | - [This NixOS wiki](//Main Page) 12 | 13 | -------------------------------------------------------------------------------- /Nix(OS) in production.page: -------------------------------------------------------------------------------- 1 | If you are using a Nix family project in production, please list 2 | yourself here: 3 | 4 | - [LogicBlox](http://zef.me/5966/setting-up-development-environments-with-nix): 5 | They sponsor NixOS by employing developers and use it in production 6 | - [Zalora](http://www.reddit.com/r/haskell/comments/1y2vx8/nixos_added_to_distrowatch_after_7_years_on/cfh4we4): 7 | Using it internally and preparing to use it in production ([they're 8 | hiring!](http://jobs.zalora.com/apply/lOd9Ir/Global-DevOps-Engineer-Remote.html)) 9 | 10 | -------------------------------------------------------------------------------- /Disabling IPv6.page: -------------------------------------------------------------------------------- 1 | There is one attribute on `configuration.nix` which is expected to 2 | system-wide disable IPv6: 3 | 4 | networking.enableIPv6 = false; 5 | 6 | This alone does not prevent my network interfaces from acquiring a 7 | default IPv6 address at boot time. Then there is this other way to 8 | request the kernel to avoid loading IPv6 support: 9 | 10 | boot.extraKernelParams = [ "ipv6.disable=1" ]; 11 | 12 | The additional parameter will get added to the kernel line in the grub 13 | configuration file. 14 | 15 | **Note**: Please have a look at the [discussion 16 | page](//Talk:Disabling IPv6) before applying this method. 17 | 18 | -------------------------------------------------------------------------------- /Escape from dependency hell.page: -------------------------------------------------------------------------------- 1 | changing package versions transitively 2 | -------------------------------------- 3 | 4 | You want a package which requires a more recent version of gtkLibs? You 5 | can't just pass a newer gtkLib version because your package depends on 6 | other packages which also depend on gtkLibs? Use pkgsFunDeepOverride to 7 | replace a package (eg selecting a newer version) within the dependency 8 | graph: [mailinglist 9 | thread](http://thread.gmane.org/gmane.linux.distributions.nixos.scm/382/focus=4468) 10 | 11 | I'm sure we'll hit cases where this doesn't help either without further 12 | adjustments. But for now it does. 13 | 14 | -------------------------------------------------------------------------------- /Scanners.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Scanners&action=edit§ion=1 "Edit section: Add SANE firmware")] Add SANE firmware 2 | --------------------------------------------------------------------------------------------------------------- 3 | 4 | Many scanners require firmware blobs which can be downloaded from the 5 | website of the scanner or extracted from the drivers they provide. Once 6 | you have the appropriate firmware you need to tell SANE where to find it 7 | in your configuration.nix: 8 | 9 | hardware.sane.enable = true; 10 | nixpkgs.config.sane.snapscanFirmware = /firmware/esfw41.bin; 11 | nixpkgs.config.packageOverrides = pkgs: { 12 | xsaneGimp = xsane.override { gimpSupport = true; }; 13 | }; 14 | -------------------------------------------------------------------------------- /Firefox.page: -------------------------------------------------------------------------------- 1 | To use plugins in firefox you need to install the "firefox-with-plugins" 2 | package. The plugins are picked on installation according to your 3 | `~/.nixpkgs/config.nix`. Example: 4 | 5 | { 6 | firefox = { 7 | jre = true; 8 | enableAdobeFlash = true; 9 | enablegoogletalkplugin = true; 10 | }; 11 | } 12 | 13 | In case of JRE you need to perform some manual download to comply with 14 | its license (Oracle JRE is used, currently). These steps are described 15 | in the output when you try to install Firefox. 16 | 17 | For a more complete and up-to-date list of plugins see the "wrapFirefox" 18 | function in 19 | 20 | 21 | -------------------------------------------------------------------------------- /Printers.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Printers&action=edit§ion=1 "Edit section: Printing with CUPS using Gutenprint")] Printing with CUPS using Gutenprint 2 | --------------------------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | Install gutenprint and configure CUPS to use it as a driver: 5 | 6 | services.printing = { 7 | enable = true; 8 | drivers = [ pkgs.gutenprint ]; 9 | }; 10 | 11 | Look for the model of your printer: `cups-genppd.5.2 -M` and then 12 | generate the PPD for that model: 13 | 14 | $ cups-genppd.5.2 -v escp2-p50 -p . 15 | 16 | Add a printer through the web interface and upload the generated PPD in 17 | the section where it asks which driver to use "Or Provide a PPD File:". 18 | 19 | -------------------------------------------------------------------------------- /OpenSSH.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=OpenSSH&action=edit§ion=1 "Edit section: OpenSSH")] OpenSSH 2 | ========================================================================================== 3 | 4 | [[edit](/w/index.php?title=OpenSSH&action=edit§ion=2 "Edit section: Installation")] Installation 5 | ---------------------------------------------------------------------------------------------------- 6 | 7 | nix-env -i openssh 8 | 9 | [[edit](/w/index.php?title=OpenSSH&action=edit§ion=3 "Edit section: Tips and Tricks")] Tips and Tricks 10 | ---------------------------------------------------------------------------------------------------------- 11 | 12 | ### [[edit](/w/index.php?title=OpenSSH&action=edit§ion=4 "Edit section: Key based authentication")] Key based authentication 13 | 14 | ssh-keygen -t rsa 15 | ssh-copy-id -i id_rsa.pub login@target.com 16 | -------------------------------------------------------------------------------- /How to get a chroot close enough to LSB for impure binary packages to work.page: -------------------------------------------------------------------------------- 1 | One of the options is special-chroot script by Michael Raskin. 2 | 3 | Checkout configurations/ tree from Nix SVN repository. The exact 4 | directory is 5 | 6 | - the file is special-chroot. It expects to be run on NixOS, although I 7 | have used it on non-NixOS Nix installations. 8 | 9 | It has the following parameters: 10 | 11 | 1\) Root path where to prepare all the stuff 2) Home path as seen after 12 | chroot 3) User name 4) *or 'usr-only' : if usr-only, /bin /sbin /lib are 13 | skipped* 5) *or path : what to use instead of 14 | /var/run/current-system/sw* 15 | 16 | Tries to make most installers safe by mounting most things ro. /old-root 17 | is mounted as rw, though. 18 | 19 | Tries to unmount everything on termination. 20 | 21 | -------------------------------------------------------------------------------- /Ruby.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Ruby&action=edit§ion=1 "Edit section: Ruby on Nix")] Ruby on Nix 2 | =============================================================================================== 3 | 4 | Currently, the workflow for developing Ruby projects on Nix is not 5 | well-defined. Please use the "Discussion" tab to help discover the best 6 | workflow. 7 | 8 | [[edit](/w/index.php?title=Ruby&action=edit§ion=2 "Edit section: Tools")] Tools 9 | ----------------------------------------------------------------------------------- 10 | 11 | Here are some tools related to Ruby on Nix. Please help by writing 12 | conceptual documentation for these. 13 | 14 | - [Ruby Nix](https://gitorious.org/ruby-nix) 15 | - [Ruby Overlay](https://gitorious.org/nixpkgs-ruby-overlay/) - 16 | ([Short Introduction on 17 | Wiki](//Nix(OS) related repositories and work#Ruby overlay .28stable.29)) 18 | 19 | -------------------------------------------------------------------------------- /Network Manager.page: -------------------------------------------------------------------------------- 1 | [Template:Note](/w/index.php?title=Template:Note&action=edit&redlink=1 "Template:Note (page does not exist)") 2 | 3 | [[edit](/w/index.php?title=Network_Manager&action=edit§ion=1 "Edit section: Installation")] Installation 4 | ------------------------------------------------------------------------------------------------------------ 5 | 6 | To enable NetworkManager service in NixOS: 7 | 8 | networking.networkmanager.enable = true; 9 | 10 | User needs to be in **networkmanager** group in order to control 11 | networkmanager configuration. 12 | 13 | ### [[edit](/w/index.php?title=Network_Manager&action=edit§ion=2 "Edit section: GTK applet")] GTK applet 14 | 15 | To use **nm-applet**, you have to install **networkmanagerapplet**. 16 | 17 | ### [[edit](/w/index.php?title=Network_Manager&action=edit§ion=3 "Edit section: KDE applet")] KDE applet 18 | 19 | The Network Manager widget for KDE is available in nixpkgs as 20 | **kde4.networkmanagement**. 21 | 22 | -------------------------------------------------------------------------------- /TODO - What is missing in the nix community.page: -------------------------------------------------------------------------------- 1 | On the nix-dev mailinglist free-nix was announced [1] - a fork of Nix. 2 | Now the community is about finding out what exactly needs to be done and 3 | why a fork would be required. 4 | 5 | - social contracts such as this 6 | 7 | - option to enable "free" packages only (eg not flash). "free" usually 8 | means open source as defined by open source software foundation or 9 | the like 10 | 11 | Let's keep in mind that nixos is young - and that there may be slightly 12 | different use cases (mobile phones) in the future. Thus policies may 13 | become outdated, too. For that reason we should only as much time on 14 | policies as necessary. There are many open question - and different 15 | styles - maybe its too early to settle on too many policies - but who 16 | knows? I feel its important that we can still "turn around" and change 17 | the direction - Marc Weber 18 | 19 | [1]: Mail with subject "Announcing free-nix: the free Linux distribution 20 | based on the Nix package manager" 21 | 22 | -------------------------------------------------------------------------------- /Bluetooth.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Bluetooth&action=edit§ion=1 "Edit section: Enabling Bluetooth in NixOS")] Enabling Bluetooth in NixOS 2 | ------------------------------------------------------------------------------------------------------------------------------------ 3 | 4 | Enabling Bluetooth is as simple as putting this in your 5 | configuration.nix: 6 | 7 | hardware.bluetooth.enable = true; 8 | 9 | [[edit](/w/index.php?title=Bluetooth&action=edit§ion=2 "Edit section: Bluez 4")] Bluez 4 10 | -------------------------------------------------------------------------------------------- 11 | 12 | This is the default for now (as of August 2013), as KDE 4.10 and 13 | Pulseaudio 4.0 do not yet support Bluez 5. 14 | 15 | [[edit](/w/index.php?title=Bluetooth&action=edit§ion=3 "Edit section: Bluez 5")] Bluez 5 16 | -------------------------------------------------------------------------------------------- 17 | 18 | To use Bluez 5, you need something like this in your Nixpkgs config (in 19 | your `~/.nixpkgs/config.nix`): 20 | 21 | pkgs : { 22 | packageOverrides = pkgs : { 23 | bluez = pkgs.bluez5; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Main Page B.page: -------------------------------------------------------------------------------- 1 | Welcome to the Nix Project Wiki! 2 | 3 | The Nix Project 4 | 5 | Package Manager 6 | 7 | [Nix Package Manager - Main Page](//Main Page Package Manager) 8 | 9 | [Dependency 10 | Management](/w/index.php?title=Dependency_Management&action=edit&redlink=1 "Dependency Management (page does not exist)") 11 | 12 | NixOS 13 | 14 | [NixOS - Main Page](//NixOS Main Page) 15 | 16 | [Modules Overview](//NixOS:Modules) 17 | 18 | [Creating Modules](//NixOS:extend NixOS) 19 | 20 | [Modifying Existing Modules](//NixOS Modifying Modules) 21 | 22 | [Containers](/w/index.php?title=NixOS:Containers&action=edit&redlink=1 "NixOS:Containers (page does not exist)") 23 | 24 | Infrastructure & Deployment 25 | 26 | Test Infrastructure 27 | 28 | Deployment & NixOps 29 | 30 | Contribute (Code, Docs, etc.) 31 | 32 | [Contributing](//Main Page Contributing) 33 | 34 | Git / Github 35 | 36 | Manual 37 | 38 | [Wiki](//Nix Wiki) 39 | 40 | NixOS Desktop 41 | 42 | [NixOS Desktop](//Main Page NixOS Desktop) 43 | 44 | Audio & KDE & Xorg 45 | 46 | Community 47 | 48 | [Project Discussion & Newsletters](//Project Discussion & Newsletters) 49 | 50 | Events & Press 51 | 52 | Frequently Asked Questions 53 | 54 | -------------------------------------------------------------------------------- /Bower2nix.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Bower2nix&action=edit§ion=1 "Edit section: Fetching bower dependencies from nix")] Fetching bower dependencies from nix 2 | ------------------------------------------------------------------------------------------------------------------------------------------------------ 3 | 4 | bower2nix[[1]](https://bitbucket.org/shlevy/bower2nix) is a simple tool 5 | for generating nix expressions to fetch dependencies specified in a 6 | bower[[2]](http://bower.io/) json file. A simple usage example: 7 | 8 | $ nix-env -iA bower2nix -f '' 9 | $ cat bower.json 10 | { 11 | "name": "bower2nix-test", 12 | "dependencies": { 13 | "jquery": "*" 14 | } 15 | } 16 | $ bower2nix bower.json bower-packages-generated.nix 17 | $ cat bower-packages-generated.nix 18 | { fetchbower }: [ 19 | (fetchbower "jquery" "2.1.0" "*" "0484cy1mhxylzy155hwgngpajxhqab8r3wksk33id230ivggl98f") 20 | ] 21 | 22 | The fetchbower function is defined in nixpkgs and is a fixed-output 23 | derivation, so importing the generated nix expression while passing 24 | fetchbower will give you a list of fixed-output derivations 25 | corresponding to your package dependencies. 26 | 27 | -------------------------------------------------------------------------------- /Docker.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Docker&action=edit§ion=1 "Edit section: running docker")] running docker 2 | ------------------------------------------------------------------------------------------------------- 3 | 4 | Run this command as root: 5 | 6 | nix-docker -p 7 | 8 | On a different shell: 9 | 10 | nix-docker images 11 | 12 | This page needs to be created and designed. For now, it's just notes. 13 | Sorry :-( 14 | 15 | Conversation on \#docker channel about packaging Docker v0.10.0: 16 | 17 | backjlack, I included btrfsProgs as a build dependency, but it looks like the docker daemon can't use it, saying something like "/var/docker/X" is not a btrfs volume. Does the OS require some setup to use the AuFS or btrfs drivers? 18 | chexxor: Yes, if you want to use btrfs, you need to create a btrfs partition and make Docker use it like this: 19 | a) ln -s /btrfs/mountpoint/docker_storage /var/lib/docker (docker_storage must exist and /var/lib/docker must not exist) 20 | OR 21 | b) start the Docker daemon with `-g /btrfs/mountpoint/docker_storage". 22 | If that fails, you can set the graphdriver (storage driver) by hand with `-s btrfs -g /btrfs/mountpoint/docker_storage`. 23 | -------------------------------------------------------------------------------- /Download all sources.page: -------------------------------------------------------------------------------- 1 | Sometimes we need to download all source dependencies of a package. An 2 | example is if a long build is being planned, so we first download all 3 | needed files - and after that we only need to worry about local 4 | (non-Internet) issues. 5 | 6 | Here is a one-liner for downloading all the source dependencies of a 7 | package (thanks Eelco Dolstra!): 8 | 9 | $> nix-store -r $(grep -l outputHash $(nix-store -qR $(nix-instantiate 10 | '\' -A geeqie) | grep '.drv\$')) 11 | 12 | Explaining how it works: 13 | 14 | - **\$(nix-instantiate '\' -A geeqie)**: instantiate geeqie 15 | into .drv files and print the file names 16 | - **$(nix-store -qR PREVIOUS | grep '.drv$')**: print all 17 | references/requirements of the above and keep only the .drv files 18 | (which is where static derivations live) 19 | - **\$(grep -l outputHash PREVIOUS)**: keep only the source 20 | derivations, since those will have a predefined hash of the output 21 | - **nix-store -r PREVIOUS**: realize those derivations, downloading 22 | all sources and storing them in the nix store 23 | 24 | After that, all sources will be locally stored! 25 | 26 | Phew! 27 | 28 | Source: 29 | 30 | 31 | -------------------------------------------------------------------------------- /Modify software.page: -------------------------------------------------------------------------------- 1 | 1\. goto the derivation and add a postBuild="fail" or such 2 | 3 | 2\. run this command: 4 | 5 | nix-env -i firefox -K 6 | 7 | 3\. then go into the failed build directory shown in the end of the error 8 | message, like: 9 | 10 | cd /tmp/nix-build-f3slzg4g3h99yqcj6lzjwc1cvcdwg6dd-torcx.drv-0 11 | 12 | /nix/store/b48470bj4b8d4x6z5rr62924n30cwsiq-stdenv/setup: line 16: fail: command not found 13 | builder for `/nix/store/f3slzg4g3h99yqcj6lzjwc1cvcdwg6dd-torcx.drv' failed; keeping build directory `/tmp/nix-build-f3slzg4g3h99yqcj6lzjwc1cvcdwg6dd-torcx.drv-0' 14 | builder for `/nix/store/f3slzg4g3h99yqcj6lzjwc1cvcdwg6dd-torcx.drv' failed with exit code 127 15 | error: build of `/nix/store/f3slzg4g3h99yqcj6lzjwc1cvcdwg6dd-torcx.drv' failed 16 | 17 | 4\. ls in this directory shows two files like: 18 | 19 | env-vars torcs-1.3.3/ 20 | 21 | 5\. type 22 | 23 | source env-vars 24 | 25 | 5\. then go into the torcs-1.3.3/ dir 26 | 27 | cd torcs-1.3.3/ 28 | 29 | 6\. now do what you want to 30 | 31 | Then cd /tmp/nix-build-... 32 | 33 | start a subshell, then source env-vars 34 | 35 | Or find out how to do the same with the --shell-command for nix-env 36 | 37 | nix-build --run-env --command /bin/sh -A slim $NIXPKGS_ALL 38 | -------------------------------------------------------------------------------- /Nix impurities.page: -------------------------------------------------------------------------------- 1 | What can theoretically cause different build results? 2 | 3 | - current date 4 | - cpu 5 | - RAM available 6 | - fileystem 7 | - kernel running the builds [1] 8 | - is a virtualization system being used ? 9 | - sensors (such as temperature) 10 | - timing behaviour of any component in use (fs, ..) (causing timeouts 11 | and such) 12 | 13 | - parallel building if you enable it. Eg make -jN sometimes fails 14 | randomly for some projects 15 | 16 | [1] quoting Lluis Batlle: 17 | 18 | We have the kernelHeaders. Programs should respect kernelHeaders for the 19 | kernel API, and not talk to the running kernel. 20 | 21 | - gconf runs in daemon mode 22 | - qt -running qgit 23 | 24 | 25 | 26 | "Cannot mix incompatible Qt library (version 0x40800) with this library (version 0x40801)" 27 | 28 | [[edit](/w/index.php?title=Nix_impurities&action=edit§ion=1 "Edit section: runtime impurities")] runtime impurities 29 | ----------------------------------------------------------------------------------------------------------------------- 30 | 31 | Stateful directories in NixOS: /etc, /var, /home can cause packages to 32 | do what they usually do. In case of trouble make a backup, delete and 33 | recreate those to trouble shoot a problem. 34 | 35 | -------------------------------------------------------------------------------- /NixOS Filesystem Notes.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=NixOS_Filesystem_Notes&action=edit§ion=1 "Edit section: NixOS Filesystem")] NixOS Filesystem 2 | =========================================================================================================================== 3 | 4 | If you discover secrets about the NixOS Filesystem, such as how they are 5 | created or their purpose, add it here. 6 | 7 | -------------------------------------------------------------------------- 8 | Directory/File 9 | Notes 10 | Related Links 11 | ------------------------ ------------------------ ------------------------ 12 | `/run/current-system/sw` 13 | Modules add paths to 14 | packages into 15 | `config.environment.syst 16 | emPackages` 17 | attribute. This is 18 | copied into the 19 | `config.system.path` 20 | attribute, which creates 21 | symlinks from the 22 | `/run/current-system/sw` 23 | directory into 24 | derivations in the Nix 25 | store. 26 | [system-path.nix](https: 27 | //github.com/NixOS/nixpk 28 | gs/blob/master/nixos/mod 29 | ules/config/system-path. 30 | nix)\ 31 | 32 | [top-level.nix](https:// 33 | github.com/NixOS/nixpkgs 34 | /blob/master/nixos/modul 35 | es/system/activation/top 36 | -level.nix) 37 | -------------------------------------------------------------------------- 38 | 39 | 40 | -------------------------------------------------------------------------------- /Solve GConf errors when running GNOME applications.page: -------------------------------------------------------------------------------- 1 | GNOME's GConf implements a system-wide registry (like on Windows) that 2 | applications can use to store and retrieve internal configuration data. 3 | That concept is inherently impure, and it's very hard to support on 4 | NixOS. The result is that applications that use GConf -- like GnuCash -- 5 | will report tons of error messages at start-up. To remedy those errors, 6 | the GConf daemon must be told the path to the application-specific 7 | \${out}/etc/gconf/gconf.xml.defaults/ directory, and the DBus daemon 8 | must be told how to start gconfd whenever an application needs it. To 9 | accomplish that, follow these steps: 10 | 11 | - Add the following line to **\~/.gconf.path**: 12 | 13 | 14 | 15 | xml:readwrite:$(HOME)/.gconf 16 | xml:readonly:$(HOME)/.nix-profile/etc/gconf/gconf.xml.defaults/ 17 | xml:readonly:/root/.nix-profile/etc/gconf/gconf.xml.defaults/ 18 | xml:readonly:/run/current-system/sw/etc/gconf/gconf.xml.defaults 19 | 20 | - Add the following line to **/etc/nixos/configuration.nix**: 21 | 22 | 23 | 24 | services.dbus.packages = [ pkgs.gnome.GConf ]; 25 | environment.pathsToLink = [ "/etc/gconf" ]; 26 | 27 | - Run **nixos-rebuild switch**. It may also be necessary to run 28 | **gconftool-2 --shutdown**, in case there already is an active 29 | gconfd, but those beasts typically terminate on their own after a 30 | few moments of inactivity. 31 | 32 | -------------------------------------------------------------------------------- /HOWTO:idutils.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=HOWTO:idutils&action=edit§ion=1 "Edit section: Idutils")] Idutils 2 | ================================================================================================ 3 | 4 | # create database: 5 | mkid 6 | 7 | # use the database maybe this way 8 | lid -R grep -r 'your regex' 9 | 10 | # too much to type? put into your .bashrc then use: mylid 'your regex' 11 | mylid(){ lid -R grep -r "$1"; } 12 | 13 | This is useful to find options in nixos (eg grep for mkOption) or find 14 | packages in nixpkgs. You may also use this to find names in source code 15 | (-\> see note). For code navigation there may be more accurate tools 16 | such as ctags or csope etc. 17 | 18 | note: you may have to use a custom config. idutils only index files it 19 | knows about. Nixpkgs contains a patch which adds .nix files to the 20 | global config file. AFAIK README files etc are skipped by default. So if 21 | you don't find what you're looking for you still may want to use plain 22 | grep. 23 | 24 | If you want to search for "foo bar" you can still use a pipe: 25 | 26 | lid -R grep -r 'foo' | grep 'foo bar' 27 | 28 | [[edit](/w/index.php?title=HOWTO:idutils&action=edit§ion=2 "Edit section: Git grep")] Git grep 29 | ================================================================================================== 30 | 31 | If you are working with nixos tree, cloned from Git repository, you may 32 | find git grep useful. 33 | 34 | git grep foo 35 | -------------------------------------------------------------------------------- /Enable Browser Plugins.page: -------------------------------------------------------------------------------- 1 | You can configure chromium with NixOS the standard way: 2 | 3 | /etc/nixos/configuration.nix: 4 | 5 | ... 6 | 7 | nixpkgs.config = { 8 | 9 | allowUnfree = true; 10 | 11 | firefox = { 12 | jre = false; 13 | enableGoogleTalkPlugin = true; 14 | enableAdobeFlash = true; 15 | }; 16 | 17 | chromium = { 18 | jre = false; 19 | enableGoogleTalkPlugin = true; 20 | enableAdobeFlash = true; 21 | }; 22 | 23 | }; 24 | ... 25 | 26 | and then install `chromiumWrapper` or `firefoxWrapper`. 27 | 28 | [[edit](/w/index.php?title=Enable_Browser_Plugins&action=edit§ion=1 "Edit section: Pepper Plugins")] Pepper Plugins 29 | ----------------------------------------------------------------------------------------------------------------------- 30 | 31 | Chromium recently removed support for Mozilla (NPAPI) plugins. The 32 | options to enable the new Pepper plugins for Flash and PDF are: 33 | 34 | nixpkgs.config = { 35 | chromium = { 36 | enablePepperFlash = true; 37 | enablePepperPDF = true; 38 | }; 39 | }; 40 | 41 | [[edit](/w/index.php?title=Enable_Browser_Plugins&action=edit§ion=2 "Edit section: Enable GPU support")] Enable GPU support 42 | ------------------------------------------------------------------------------------------------------------------------------- 43 | 44 | For intel: 45 | 46 | services.xserver.vaapiDrivers = [ pkgs.vaapiIntel ]; 47 | -------------------------------------------------------------------------------- /How to unpack a package's sourcecode.page: -------------------------------------------------------------------------------- 1 | Here is the script that can be used to unpack a package's tarball into a 2 | current directory. Note, that it uses names as the defined in 3 | top-level.nix, not from package's meta. 4 | 5 | #!/bin/sh 6 | 7 | # Unpacks the target 8 | unpack () { 9 | local curSrc="$1" 10 | local friendlyName="$2" 11 | test -z "$curSrc" && return 2 12 | case "$curSrc" in 13 | *.tar) tar xvf $curSrc ;; 14 | *.tar.gz|*.tgz|*.tar.Z) gzip -d < $curSrc | tar xvf - ;; 15 | *.tar.bz2|*.tbz2) bzip2 -d < $curSrc | tar xvf - ;; 16 | *.zip) unzip $curSrc ;; 17 | *) if test -d "$curSrc" ; then 18 | if test -n "$friendlyName" ; then 19 | cp -prvd "$curSrc" "./$friendlyName" 20 | else 21 | cp -prvd "$curSrc" . 22 | fi 23 | else 24 | echo "source archive $curSrc has unknown type" >&2 25 | return 1 26 | fi ;; 27 | esac 28 | } 29 | 30 | # Fetches the tarball into a store 31 | fetch () { 32 | nix-build --no-out-link "" -A $1.src --show-trace 33 | 34 | # To use non-default source tree, uncomment this instead 35 | #nix-build --no-out-link ~/code/nix/nixpkgs/pkgs/top-level/all-packages.nix -A $1.src --show-trace 36 | } 37 | 38 | unpack `fetch $1` $1 39 | 40 | Copy it to a directory which is listed in the PATH, name it nix-unpack. 41 | Then, to obtain, say, Midnight Commander's sources, run: 42 | 43 | nix-unpack mc 44 | 45 | Thanks goes to Mark Weber, Lluis Batlle, Yury G. Kudrya 46 | 47 | -------------------------------------------------------------------------------- /Fonts.page: -------------------------------------------------------------------------------- 1 | ### [[edit](/w/index.php?title=Fonts&action=edit§ion=1 "Edit section: Installation")] Installation 2 | 3 | 1. Pick a few fonts (`nix-env -qaP|grep -i font` or look at 4 | ) 5 | 2. Put them in `configuration.nix`: 6 | 7 | 8 | 9 | { 10 | fonts = { 11 | enableFontDir = true; 12 | enableGhostscriptFonts = true; 13 | fonts = with pkgs; [ 14 | corefonts # Micrsoft free fonts 15 | inconsolata # monospaced 16 | ubuntu_font_family # Ubuntu fonts 17 | ]; 18 | }; 19 | } 20 | 21 | ### [[edit](/w/index.php?title=Fonts&action=edit§ion=2 "Edit section: Debugging")] Debugging 22 | 23 | The global Fontconfig configuration is kept in `/etc/fonts/fonts.conf`. 24 | This file is generated automatically, and should not be edited directly, 25 | but it can be useful to see what is actually written there. If you 26 | enable `enableFontDir`, all fonts are available under 27 | `/run/current-system/sw/share/X11-fonts` as well 28 | 29 | You can also use `xlsfonts` to see which fonts are available to X. 30 | 31 | [[edit](/w/index.php?title=Fonts&action=edit§ion=3 "Edit section: Rebuild Font Cache")] Rebuild Font Cache 32 | -------------------------------------------------------------------------------------------------------------- 33 | 34 | If some fonts appear distorted, e.g. characters are invisible, or not 35 | anti-aliased you may need to rebuild the font cache: 36 | 37 | $ fc-cache --really-force --verbose 38 | -------------------------------------------------------------------------------- /OpenGrok.page: -------------------------------------------------------------------------------- 1 | OpenGrok is source code search and cross reference engine that can be 2 | used both from command line and from the web. NixOS actually provides 3 | the package but not the service. 4 | 5 | [[edit](/w/index.php?title=OpenGrok&action=edit§ion=1 "Edit section: OpenGrok with tomcat")] OpenGrok with tomcat 6 | --------------------------------------------------------------------------------------------------------------------- 7 | 8 | This guide explains how to set up the OpenGrok web interface through 9 | tomcat. We also assume for simplicity that the opengrok data is owned by 10 | the tomcat user, and that we will be indexing git repositories. 11 | 12 | First of all enable tomcat, and let the opengrok webapp find git: 13 | 14 | services.tomcat.enable = true; 15 | jobs.tomcat.path = [ pkgs.git ]; 16 | 17 | Now install opengrok and deploy it. Opengrok will automatically detect 18 | tomcat and deploy the .war under /source: 19 | 20 | nix-env -i opengrok 21 | OpenGrok deploy 22 | 23 | You should now be able to open . 24 | 25 | Now let's create the necessary opengrok directories and fetch some 26 | source to be indexed: 27 | 28 | mkdir /var/opengrok/src 29 | cd /var/opengrok/src 30 | git clone https://github.com/NixOS/nix.git 31 | chown -R tomcat /var/opengrok 32 | 33 | Each directory under /var/opengrok/src is a project to be indexed. 34 | 35 | Now run the indexer: 36 | 37 | OpenGrok index 38 | 39 | Note that until it hasn't finished, you will not be able to search 40 | anything in the web interface. 41 | 42 | -------------------------------------------------------------------------------- /NixOS Modifying Modules.page: -------------------------------------------------------------------------------- 1 | NixOS provides many modules which install and configure software, and 2 | these modules provide an interface which allows a user to change 3 | configuration options. Sometimes, the module's interface doesn't provide 4 | an option which will produce our desired configuration, so we must 5 | modify the NixOS module to add this option. Or, sometimes the 6 | implementation of a module or its options is incorrect, and we must 7 | modify the module to fix it. 8 | 9 | We have a few options to modify existing NixOS modules. 10 | 11 | - Fork the NixPkgs project and modify the module's implementation in 12 | our fork, then, optionally, push this modification back to the 13 | project. 14 | - Create a Nix expression which overrides the existing module. 15 | 16 | [[edit](/w/index.php?title=NixOS_Modifying_Modules&action=edit§ion=1 "Edit section: Fork and Modify NixPkgs")] Fork and Modify NixPkgs 17 | ------------------------------------------------------------------------------------------------------------------------------------------ 18 | 19 | !!! To do: Using the 20 | [Nix\_Modifying\_Packages](//Nix Modifying Packages) page as a template, 21 | add instructions here. 22 | 23 | [[edit](/w/index.php?title=NixOS_Modifying_Modules&action=edit§ion=2 "Edit section: Overriding Existing an Existing Module")] Overriding Existing an Existing Module 24 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 25 | 26 | !!! To do: Using the [Manual: Customising 27 | Packages](http://nixos.org/nixos/manual/#sec-customising-packages%7CNixOS) 28 | as a guide, add instructions here. 29 | 30 | -------------------------------------------------------------------------------- /Rough ideas.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Rough_ideas&action=edit§ion=1 "Edit section: Mood board")] Mood board 2 | ---------------------------------------------------------------------------------------------------- 3 | 4 | ### [[edit](/w/index.php?title=Rough_ideas&action=edit§ion=2 "Edit section: Keywords")] Keywords 5 | 6 | Pure, Refreshing, Clean, Solid, Reliable, Exciting, Mathematical 7 | 8 | ### [[edit](/w/index.php?title=Rough_ideas&action=edit§ion=3 "Edit section: Metaphors")] Metaphors 9 | 10 | Snowflake, Ice, Water, Ocean, Iceberg, Steam, Stream, Cloud 11 | 12 | [[edit](/w/index.php?title=Rough_ideas&action=edit§ion=4 "Edit section: Slogans")] Slogans 13 | ---------------------------------------------------------------------------------------------- 14 | 15 | Refreshingly Pure, No Surprises 16 | 17 | Mathematically Correct 18 | 19 | Provably Correct 20 | 21 | You don't need to believe in Mathematics 22 | 23 | quod erat demonstrandum / ΟΕΔ 24 | 25 | [[edit](/w/index.php?title=Rough_ideas&action=edit§ion=5 "Edit section: Funny")] Funny 26 | ------------------------------------------------------------------------------------------ 27 | 28 | ### [[edit](/w/index.php?title=Rough_ideas&action=edit§ion=6 "Edit section: Religious")] Religious 29 | 30 | "St. Nix": Replace the halo in medieval paintings of saints with the Nix 31 | Snowflake 32 | 33 | "Lamba / lambs": The lambda of God 34 | 35 | [[edit](/w/index.php?title=Rough_ideas&action=edit§ion=7 "Edit section: Logo usage")] Logo usage 36 | ---------------------------------------------------------------------------------------------------- 37 | 38 | The colors looks purple on some displays, and blue on others. Perhaps we 39 | should pick safer colors? 40 | 41 | -------------------------------------------------------------------------------- /How to add large files to the nix-store.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=How_to_add_large_files_to_the_nix-store&action=edit§ion=1 "Edit section: Why")] Why 2 | ================================================================================================================== 3 | 4 | to introduce a file into the nix store, you normally either use 5 | 6 | nix-store --add-fixed sha256 largefile 7 | 8 | or 9 | 10 | nix-prefetch-url file://$(pwd)/largefile 11 | 12 | but both procedures try to load the whole file into memory and thus 13 | fail, if it doesn't fit there. 14 | 15 | [[edit](/w/index.php?title=How_to_add_large_files_to_the_nix-store&action=edit§ion=2 "Edit section: How")] How 16 | ================================================================================================================== 17 | 18 | properly adding the file on your own is a three step procedure: 19 | 20 | ### [[edit](/w/index.php?title=How_to_add_large_files_to_the_nix-store&action=edit§ion=3 "Edit section: find the right store path")] find the right store path 21 | 22 | nix-store --print-fixed-path sha256 $(nix-hash --type sha256 --flat --base32 largefile) largefile 23 | 24 | ### [[edit](/w/index.php?title=How_to_add_large_files_to_the_nix-store&action=edit§ion=4 "Edit section: copy/move the file there (as root)")] copy/move the file there (as root) 25 | 26 | mount -o remount,rw /nix/store 27 | mv largefile /nix/store 28 | mount -o remount,ro /nix/store 29 | 30 | ### [[edit](/w/index.php?title=How_to_add_large_files_to_the_nix-store&action=edit§ion=5 "Edit section: register the file")] register the file 31 | 32 | nix-store --register-validity --reregister RET 33 | RET 34 | RET 35 | 0 RET 36 | C-d 37 | -------------------------------------------------------------------------------- /Nix on Windows.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Nix_on_Windows&action=edit§ion=1 "Edit section: viric's findings")] viric's findings 2 | ------------------------------------------------------------------------------------------------------------------- 3 | 4 | (viric) I think Side-by-side components are the way to go, so DLL are 5 | not taken as \*strictly shared\* by Windows only based on the filename. 6 | [This document section 7 | 3.3](http://msdn.microsoft.com/en-us/library/ms995843.aspx) says that 8 | this behaviour of sxs will only happen if the files are placed in the 9 | named directory, or otherwise they will be taken as shared. 10 | 11 | [[edit](/w/index.php?title=Nix_on_Windows&action=edit§ion=2 "Edit section: invalidmagic's findings")] invalidmagic's findings 12 | --------------------------------------------------------------------------------------------------------------------------------- 13 | 14 | i've been experimenting with nix on windows and mingw as a new 15 | toolchain: 16 | 17 | https://invalidmagic.wordpress.com/2011/02/14/bringing-nix-to-its-limits/ 18 | 19 | two problems (discussed at the blog posting from above): 20 | 21 | - curl vs curl.exe seems to create problems (as cygwin sees both as 22 | the same program) 23 | - symlinks and dll files (PATH, missing LD\_LIBRARY\_PATH) is another 24 | 25 | just don't forget to check it out! 26 | --[Invalidmagic](/w/index.php?title=User:Invalidmagic&action=edit&redlink=1 "User:Invalidmagic (page does not exist)") 27 | 19:49, 14 February 2011 (UTC) 28 | 29 | test if comments work 30 | 31 | yes, this is another line ;-) 32 | 33 | --[Invalidmagic](/w/index.php?title=User:Invalidmagic&action=edit&redlink=1 "User:Invalidmagic (page does not exist)") 34 | 18:56, 15 February 2011 (UTC) 35 | 36 | -------------------------------------------------------------------------------- /Lenovo Thinkpad Helix.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Lenovo_Thinkpad_Helix&action=edit§ion=1 "Edit section: Lenovo ThinkPad Helix")] Lenovo ThinkPad Helix 2 | ==================================================================================================================================== 3 | 4 | [[edit](/w/index.php?title=Lenovo_Thinkpad_Helix&action=edit§ion=2 "Edit section: Overview")] Overview 5 | ---------------------------------------------------------------------------------------------------------- 6 | 7 | ------------------------------------------------------------------------- 8 | Component 9 | Hardware 10 | ------------------------------------ ------------------------------------ 11 | Graphics Wireless 12 | Intel HD 4000 Intel 6205 Advanced-N 13 | ------------------------------------------------------------------------- 14 | 15 | : Hardware support 16 | 17 | [[edit](/w/index.php?title=Lenovo_Thinkpad_Helix&action=edit§ion=3 "Edit section: Preparing to boot nixos")] Preparing to boot nixos 18 | ---------------------------------------------------------------------------------------------------------------------------------------- 19 | 20 | In BIOS, disable Secure boot and enable legacy boot (non-UEFI). 21 | 22 | [[edit](/w/index.php?title=Lenovo_Thinkpad_Helix&action=edit§ion=4 "Edit section: Tips & Tricks")] Tips & Tricks 23 | -------------------------------------------------------------------------------------------------------------------- 24 | 25 | ### [[edit](/w/index.php?title=Lenovo_Thinkpad_Helix&action=edit§ion=5 "Edit section: Disable speaker")] Disable speaker 26 | 27 | Add this to your /etc/nixos/configuration.nix. 28 | 29 | boot.blacklistedKernelModules = [ "pcspkr" ]; 30 | -------------------------------------------------------------------------------- /Hydra.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Hydra&action=edit§ion=1 "Edit section: hydra.nixos.org")] hydra.nixos.org 2 | -------------------------------------------------------------------------------------------------------- 3 | 4 | ### [[edit](/w/index.php?title=Hydra&action=edit§ion=2 "Edit section: Documentation")] Documentation 5 | 6 | - [Installing Hydra on Ubuntu](//Installing Hydra on Ubuntu) 7 | - [Manual](http://hydra.nixos.org/job/hydra/trunk/tarball/latest/download-by-type/doc-pdf/manual) 8 | 9 | ### [[edit](/w/index.php?title=Hydra&action=edit§ion=3 "Edit section: Build machines")] Build machines 10 | 11 | #### [[edit](/w/index.php?title=Hydra&action=edit§ion=4 "Edit section: Linux")] Linux 12 | 13 | - hydra1 14 | - kyle 15 | - stan 16 | - kenny 17 | - jimmy 32 18 | - Intel Core 2 6700 2.66GHz, 2GB, 220GB disk 19 | - timmy 32 20 | - Intel Core 2 6700 2.66GHz, 2GB, 220GB disk 21 | 22 | #### [[edit](/w/index.php?title=Hydra&action=edit§ion=5 "Edit section: Mac OS X")] Mac OS X 23 | 24 | - black 25 | - Mac Mini, Intel Core Duo 1.83 GHz, 1GB, 74GB disk 26 | - token 27 | - Mac Mini, Intel Core Duo 1.83 GHz, 1GB, 74GB disk 28 | - butters 29 | - Apple XServe, 2x Quad-Core Intel Xeon 2.26 GHz, 24 GB, 1 TB 30 | RAID1 31 | 32 | #### [[edit](/w/index.php?title=Hydra&action=edit§ion=6 "Edit section: Windows")] Windows 33 | 34 | - garrison 35 | - Intel Core 2 6700 2.66GHz, 2GB, 220GB disk 36 | 37 | #### [[edit](/w/index.php?title=Hydra&action=edit§ion=7 "Edit section: FreeBSD")] FreeBSD 38 | 39 | - phillip 40 | - Intel Core 2 6700 2.66GHz, 2GB, 220GB disk 41 | 42 | #### [[edit](/w/index.php?title=Hydra&action=edit§ion=8 "Edit section: Solaris")] Solaris 43 | 44 | - tweek 45 | - Xen VM 46 | 47 | -------------------------------------------------------------------------------- /Using the ZSH SHELL.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Using_the_ZSH_SHELL&action=edit§ion=1 "Edit section: problem description")] problem description 2 | ------------------------------------------------------------------------------------------------------------------------------ 3 | 4 | i love to use zsh but on nixos there is a issue with the PATH variable 5 | so that once you changed from bash to zsh commands like: ssh mybox "ls 6 | -la" won't work. 7 | 8 | [[edit](/w/index.php?title=Using_the_ZSH_SHELL&action=edit§ion=2 "Edit section: my solution:")] my solution: 9 | ---------------------------------------------------------------------------------------------------------------- 10 | 11 | in a bash shell do: 12 | 13 | export | grep '^PATH=' 14 | PATH=/var/setuid-wrappers:/home/joachim/.nix-profile/bin:/home/joachim/.nix-profile/sbin:/home/joachim/.nix-profile/lib/kde4/libexec:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/nix/var/nix/profiles/default/lib/kde4/libexec:/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin:/var/run/current-system/sw/lib/kde4/libexec 15 | 16 | then put it into your \~/.zshenv file like this: 17 | 18 | echo "export $(export | grep '^PATH=')" > ~/.zshenv 19 | 20 | [[edit](/w/index.php?title=Using_the_ZSH_SHELL&action=edit§ion=3 "Edit section: better solution")] better solution 21 | ---------------------------------------------------------------------------------------------------------------------- 22 | 23 | marc weber was working on the same issue and IIRC then he got a fix in 24 | his repo which might automate the above changes. 25 | 26 | **NOTE: you will face issues where changing PATH entries might cause 27 | failures from single programs not startable to not being able to log 28 | into your server when using zsh as a default shell.** 29 | 30 | -------------------------------------------------------------------------------- /Remote controlling a vm.page: -------------------------------------------------------------------------------- 1 | Eelco Dolstra wrote a patch which is applied to the qemu\_kvm derivation 2 | by default. 3 | 4 | The commit message says all so I just copy paste it here: 5 | 6 | * qemu-kvm: a quick hack to support connecting a Unix domain socket on the host to a TCP port on the guest. This will be useful for automated testing using QEMU virtual machines. Using TCP ports on the host is insecure and hard to manage (since you need to pick an available host port). 7 | 8 | For example: 9 | 10 | $ qemu-system-x86_64 ... -redir tcp:65535::514 11 | 12 | creates a Unix domain socket `./65535.socket' on the host. (There 13 | is no proper syntax yet, so as a hack all host "ports" above 0xff00 14 | are treated in this way.) Connections to that socket are then 15 | forwarded to TCP port 514 on the guest. So the guest can do 16 | 17 | $ nc -l -p 514 -e /bin/sh 18 | 19 | to execute a shell for incoming connections on port 514, and then 20 | the host can do 21 | 22 | $ socat stdio ./65535.socket 23 | 24 | to run a shell on the guest. 25 | 26 | The vm connects to the internet using slirp mode by default. You can 27 | offer access to /nix/store using samba / cifs. There will be an example 28 | in nixos/tests/test-nixos-install-from-cd.nix testing the nixos 29 | installation soon (to be finished and committed). Don't miss the other 30 | scripts in nixos/tests/\* testing that kde4 is starting etc. 31 | 32 | Also have a look at the paper "Declarative Testing and Deployment of 33 | Distributed Systems" by Sander van der Burg and Eelco Dolstra. 34 | [[1]](http://nixos.org/docs/papers.html) 35 | 36 | TODO: add all information which is of value and clean up this page 37 | 38 | -------------------------------------------------------------------------------- /Main Page Contributing.page: -------------------------------------------------------------------------------- 1 | This wiki was created by the Nix community to help others understand and 2 | use the Nix Project. Please help by adding pages for missing topics and 3 | updating information in existing pages. 4 | 5 | [[edit](/w/index.php?title=Main_Page_Contributing&action=edit§ion=1 "Edit section: Before You Start")] Before You Start 6 | =========================================================================================================================== 7 | 8 | - [Getting Help](//Getting Help) 9 | - [Coding 10 | Conventions](/w/index.php?title=Coding_Conventions&action=edit&redlink=1 "Coding Conventions (page does not exist)") 11 | - [Style Guide for Derivations](//Open issues:derivation styles) 12 | 13 | [[edit](/w/index.php?title=Main_Page_Contributing&action=edit§ion=2 "Edit section: Contributing")] Contributing 14 | =================================================================================================================== 15 | 16 | - [Creating and Debugging a Nix 17 | Package](//Create and debug nix packages) 18 | - [Adding a Nix Package](//Contributing to nixpkgs) 19 | - [Creating a Pull 20 | Request](/w/index.php?title=Pull_Request&action=edit&redlink=1 "Pull Request (page does not exist)") 21 | 22 | - [How to Extend NixOS](//NixOS:extend NixOS) 23 | 24 | - Contributing to this Wiki 25 | 26 | [[edit](/w/index.php?title=Main_Page_Contributing&action=edit§ion=3 "Edit section: Where to Help")] Where to Help 27 | ===================================================================================================================== 28 | 29 | - [Related Repostories and 30 | Work](//Nix(OS) related repositories and work) 31 | - [What's Missing in Nix 32 | Community?](//TODO - What is missing in the nix community) 33 | - [Automatically Updating 34 | Sources](//Open issues:ways of updating sources automatically) 35 | 36 | -------------------------------------------------------------------------------- /Enable GTK themes in KDE.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Enable_GTK_themes_in_KDE&action=edit§ion=1 "Edit section: KDE System Settings")] KDE System Settings 2 | ----------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | Nixpkgs now provides the GTK configuration module for KDE system 5 | settings, which you can install with: 6 | 7 | $ nix-env -i kde-gtk-config 8 | 9 | You should also install any GTK themes you like. You can choose a GTK 10 | theme and set related options in 11 | `System Settings > Application Appearance > GTK`. 12 | 13 | [[edit](/w/index.php?title=Enable_GTK_themes_in_KDE&action=edit§ion=2 "Edit section: Manually")] Manually 14 | ------------------------------------------------------------------------------------------------------------- 15 | 16 | As a normal nix user you can install the Oxygen GTK theme: 17 | 18 | $ nix-env -i oxygen-gtk 19 | 20 | KDE will run any scripts you place in \~/.kde/env on startup so this is 21 | a good place to set the GTK\_PATH so that applications can find the 22 | theme engine. If the path is wrong/unset you will see errors like this: 23 | 24 | Gtk-WARNING **: Unable to locate theme engine in module_path 25 | 26 | To set Oxygen-GTK as the gtk theme create the following file and make it 27 | executable: \~/.kde/env/set-gtk-theme.sh 28 | 29 | #!/bin/sh 30 | 31 | export GTK_PATH=$GTK_PATH:~/.nix-profile/lib/gtk-2.0 32 | export GTK2_RC_FILES=$GTK2_RC_FILES:~/.nix-profile/share/themes/oxygen-gtk/gtk-2.0/gtkrc 33 | 34 | Alternatively, on NixOS: 35 | 36 | environment = { 37 | systemPackages = [ pkgs.oxygen_gtk ]; 38 | shellInit = '' 39 | export GTK_PATH=$GTK_PATH:${pkgs.oxygen_gtk}/lib/gtk-2.0 40 | export GTK2_RC_FILES=$GTK2_RC_FILES:${pkgs.oxygen_gtk}/share/themes/oxygen-gtk/gtk-2.0/gtkrc 41 | ''; 42 | }; 43 | -------------------------------------------------------------------------------- /Installing Hydra on Ubuntu.page: -------------------------------------------------------------------------------- 1 | $ apt-get install postgresql 2 | 3 | $ sudo -u postgres createuser hydra -P 4 | Enter password for new role: 5 | Enter it again: 6 | Shall the new role be a superuser? (y/n) n 7 | Shall the new role be allowed to create databases? (y/n) n 8 | Shall the new role be allowed to create more new roles? (y/n) n 9 | 10 | $ sudo -u postgres createdb -O hydra hydra 11 | 12 | $ nix-channel --add http://hydra.nixos.org/jobset/hydra/trunk/channel/latest 13 | $ nix-channel --update 14 | $ nix-env -i hydra 15 | 16 | $ mkdir $HOME/hydra 17 | 18 | Add to the .profile of the user running hydra: 19 | 20 | export HYDRA_DBI="dbi:Pg:dbname=hydra;host=localhost;user=hydra;" 21 | export HYDRA_DATA=$HOME/hydra 22 | 23 | Change the line in /etc/postgresql/8.4/main/pg\_hba.conf 24 | 25 | # old line 26 | local all all ident 27 | # new line 28 | local all all md5 29 | 30 | and restart the postgresql service 31 | 32 | $ sudo -u postgres /etc/init.d/postgresql restart 33 | 34 | Gives user hydra all rights to the database: 35 | 36 | $ echo "GRANT ALL ON DATABASE hydra TO hydra;" | sudo -u postgres psql hydra 37 | 38 | Create .pgpass with following contents: 39 | 40 | localhost:*:*:hydra:yourpassword 41 | 42 | Make sure permissions are set correctly 43 | 44 | $ chmod 0600 $HOME/.pgpass 45 | 46 | Initialize the database: 47 | 48 | $ cat $HOME/.nix-profile/share/hydra/sql/hydra-postgresql.sql | psql -U hydra hydra 49 | 50 | Add user root to hydra and make admin: 51 | 52 | $ echo "INSERT INTO Users(userName, emailAddress, password) VALUES ('root', 'some@email.com', '$(echo -n foobar | sha1sum | cut -c1-40)');" | psql -U hydra hydra 53 | $ echo "INSERT INTO UserRoles(userName, role) values('root', 'admin');" | psql -U hydra hydra 54 | -------------------------------------------------------------------------------- /For The Uninitiated.page: -------------------------------------------------------------------------------- 1 | This page is ment to be a long list command line applications and 2 | functions that some people may not know how to use. For instance how to 3 | pipe the output of a command to another command (ex. **lspci |grep 4 | Network**). It is ment to be both a learning tool for bash, 5 | nix-expressions and NixOS. 6 | 7 | **Under construction**. As such this page does not yet need a structure 8 | but is merely present so that it can be shared and edited by the 9 | community. 10 | 11 | **This page is a part of the [UDX Initiative](//UDX Initiative)** which 12 | focuses on easily understood, simple and clear explanations and 13 | documentation to ensure the least amount of communication faults between 14 | User & Developer 15 | 16 | ### [[edit](/w/index.php?title=For_The_Uninitiated&action=edit§ion=1 "Edit section: The Basics")] The Basics 17 | 18 | A command line is a line of text which the user can write text in to run 19 | applications and manipulate the environment and operating system, which 20 | then usually outputs one, several or many lines of text to illustrate a 21 | task or information in a systematic and structured way. 22 | 23 | All commands in the command line have options to them signified by 24 | either one line for short (**-v**) or two lines for the name of the 25 | function (**--verbose**). When using verbose we are asking the command 26 | to not filter or omit any information, but to give as much information 27 | as possible (or to be *verbose*). 28 | 29 | ### [[edit](/w/index.php?title=For_The_Uninitiated&action=edit§ion=2 "Edit section: Filtering Commands")] Filtering Commands 30 | 31 | *Cut* [[1]](http://man.he.net/?topic=cut§ion=all) 32 | : Cut allows you to cut out certain bytes, characters and fields 33 | provided by output. 34 | 35 | *To cut away the rest of the characters in a line after **32** characters* 36 | : `ls /nix/store/ |cut -c -32` 37 | 38 | *To cut away the first **34** characters of a line:* 39 | : `ls /nix/store/ |cut -c 34-` 40 | 41 | -------------------------------------------------------------------------------- /Install NixOS as OpenVZ guest.page: -------------------------------------------------------------------------------- 1 | Set convenience variables: 2 | 3 | export veid=777 4 | export mountPoint=/mnt 5 | 6 | Download [NixOS minimal install 7 | archive](http://hydra.nixos.org/job/nixos/trunk/minimal_install_archive/). 8 | 9 | Extract the archive: 10 | 11 | mkdir /vz/private/$veid 12 | tar -xjf nixos-install-archive.tar.bz2 -C /vz/private/$veid 13 | 14 | Prepare for installation: 15 | 16 | mount -o bind /vz/private/$veid $mountPoint 17 | bash $mountPoint/nix/store/nixos-prepare-install checkout-sources copy-nix 18 | 19 | Configure NixOS: 20 | 21 | nano $mountPoint/etc/nixos/configuration.nix 22 | 23 | This is the minimal working nixos config(don't forget to replace \$IP 24 | with the IP you're going to assign to the guest): 25 | 26 | {pkgs, config, ...}: 27 | { 28 | boot.loader.initScript.enable = true; 29 | 30 | # fake root since nixos requires this to be set 31 | fileSystems = [ { 32 | mountPoint = "/"; 33 | label = "nixos"; 34 | options ="noauto"; 35 | } ]; 36 | 37 | networking = { 38 | defaultGateway = "$IP"; 39 | interfaces = [ { 40 | name = "venet0"; 41 | ipAddress = "$IP"; 42 | } ]; 43 | }; 44 | } 45 | 46 | Install: 47 | 48 | bash $mountPoint/nix/store/run-in-chroot "/nix/store/nixos-bootstrap --install --no-grub" 49 | 50 | Configure OpenVZ: 51 | 52 | vzctl set $veid --applyconfig vps.basic --save 53 | vzctl set $veid --ipadd $IP --save 54 | 55 | Edit /etc/vz/conf/\$veid.conf to increase ram and disk space available. 56 | NixOs occasionally needs more than 256M of RAM for nixos-rebuild. 57 | 58 | Known issues: 59 | 60 | - df is broken unless you symlink /proc/mounts to /etc/mtab, it is 61 | overwritten on every reboot. 62 | - stopping container takes a lot of time 63 | - openvz can't change the IP of the container, you need to change it 64 | by hand in nixos config in addition to openvz settings. 65 | - Sometimes tty services keep restarting over and over. They can 66 | safely be stopped by "stop ttyX", X = 1 to 6. 67 | 68 | -------------------------------------------------------------------------------- /NixOS:Properties.page: -------------------------------------------------------------------------------- 1 | Properties are used to scope option definitions with control flow 2 | statements which do not break 3 | ([example](//NixOS:config argument#Conditional Statements)) the highly 4 | recursive process of merging modules. All properties are defined in 5 | [`pkgs/lib/properties.nix`](https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/lib/properties.nix%7C). 6 | 7 | - `mkNotdef`: Invalidate a definition. Any attribute which has this 8 | value is considered as not defined in the current module. 9 | - `mkIf condition definitions`: Create a conditional statements around 10 | multiple definitions. The definitions are considered only if the 11 | condition is verified. 12 | - `mkThenElse { thenPart = definitions; elsePart = definitions; }`: 13 | Create two different evaluations based on the result of all previous 14 | `mkIf` conditions. 15 | - `mkAlways`: Ignore all previous `mkIf` conditions. 16 | - `mkOverrideTemplate priority template definitions`: Set a priority 17 | level to all definitions which are enumerated inside the template. 18 | Only definitions with the lower priority level are kept. The default 19 | priority level is 100. An empty template is considered as all 20 | definitions. 21 | - `mkOverride priority template definitions`: Currently the same as 22 | `mkOverrideTemplate`. 23 | - `mkDefaultValue definitions`: A shortcut notation to define default 24 | values (priority level of 1000) inside the configuration. This is 25 | extremely useful to avoid references to properties inside the user 26 | configuration while overriding the default value of the option. Any 27 | option define without this property will take precedence over it. 28 | - `mkOrder rank definitions`: Add a rank value to definitions. This is 29 | useful for options where some dependences between definitions exist. 30 | A lower rank will add the definitions among the first definitions. 31 | The default rank is 100. 32 | - `mkHeader definitions`: A shortcut notation to define a rank of 10 33 | with `mkOrder`. 34 | - `mkFooter definitions`: A shortcut notation to define a rank of 1000 35 | with `mkOrder`. 36 | 37 | -------------------------------------------------------------------------------- /Real World NixOS Dotfiles.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Real_World_NixOS_Dotfiles&action=edit§ion=1 "Edit section: Dotfiles")] Dotfiles 2 | -------------------------------------------------------------------------------------------------------------- 3 | 4 | ### [[edit](/w/index.php?title=Real_World_NixOS_Dotfiles&action=edit§ion=2 "Edit section: shelvy")] shelvy 5 | 6 | [[1]](https://github.com/shlevy/dotfiles/tree/master/nixos) (Xmonad) 7 | 8 | ### [[edit](/w/index.php?title=Real_World_NixOS_Dotfiles&action=edit§ion=3 "Edit section: Sergey")] Sergey 9 | 10 | - [[2]](https://github.com/ierton/nixrc/blob/master/nixos-intel-ideapad.nix) 11 | Lenovo s10-3t netbook, Wicd, Xfce, few custom packages. 12 | - [[3]](https://github.com/ierton/nixrc/blob/master/nixos-samsung-np900x3c.nix) 13 | Samsung NP900X3c 14 | - [[4]](https://github.com/ierton/nixrc/blob/master/nixos-homeserver.nix) 15 | Simple home server 16 | 17 | ### [[edit](/w/index.php?title=Real_World_NixOS_Dotfiles&action=edit§ion=4 "Edit section: Chaoflow")] Chaoflow 18 | 19 | [[5]](https://github.com/chaoflow/nixos-configurations), has a good 20 | readme! 21 | 22 | ### [[edit](/w/index.php?title=Real_World_NixOS_Dotfiles&action=edit§ion=5 "Edit section: garbas")] garbas 23 | 24 | [[6]](https://github.com/garbas/nixos-configuration) lenovo x220, i3 25 | 26 | ### [[edit](/w/index.php?title=Real_World_NixOS_Dotfiles&action=edit§ion=6 "Edit section: goibhniu")] goibhniu 27 | 28 | [[7]](https://gitorious.org/goibhnix/) A collection of configs with 29 | shared components and an update script for end users 30 | 31 | ### [[edit](/w/index.php?title=Real_World_NixOS_Dotfiles&action=edit§ion=7 "Edit section: pSub")] pSub 32 | 33 | - [[8]](https://github.com/pSub/configs/tree/master/nixos/configuration.nix) 34 | Configuration of my notebooks. 35 | - [[9]](https://github.com/pSub/configs/tree/master/nixos/server) 36 | Configuration of my little vServer. 37 | 38 | [[edit](/w/index.php?title=Real_World_NixOS_Dotfiles&action=edit§ion=8 "Edit section: Other stuff")] Other stuff 39 | -------------------------------------------------------------------------------------------------------------------- 40 | 41 | [[10]](https://nixos.org/websvn/nix/configurations/trunk/) (some up to 42 | date, some outdated) 43 | 44 | -------------------------------------------------------------------------------- /Project Discussion & Newsletters.page: -------------------------------------------------------------------------------- 1 | Several channels exist for NixOS project discussion. Please subscribe to 2 | those which match your interests. 3 | 4 | [[edit](/w/index.php?title=Project_Discussion_%26_Newsletters&action=edit§ion=1 "Edit section: Project Discussion Channels")] Project Discussion Channels 5 | ------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 | 7 | ### [[edit](/w/index.php?title=Project_Discussion_%26_Newsletters&action=edit§ion=2 "Edit section: Users")] Users 8 | 9 | - [Nix-Dev Mailing 10 | List](http://lists.science.uu.nl/mailman/listinfo/nix-dev) 11 | - [\#nixos IRC Channel on Freenode](irc://irc.freenode.net/#nixos) 12 | 13 | ### [[edit](/w/index.php?title=Project_Discussion_%26_Newsletters&action=edit§ion=3 "Edit section: Developers")] Developers 14 | 15 | - [NixPkgs Issues](https://github.com/NixOS/nixpkgs/issues) 16 | - [Nix Issues](https://github.com/NixOS/nix/issues) 17 | - [NixOps Issues](https://github.com/NixOS/nixops/issues) 18 | 19 | [[edit](/w/index.php?title=Project_Discussion_%26_Newsletters&action=edit§ion=4 "Edit section: Community Publications")] Community Publications 20 | --------------------------------------------------------------------------------------------------------------------------------------------------- 21 | 22 | ### [[edit](/w/index.php?title=Project_Discussion_%26_Newsletters&action=edit§ion=5 "Edit section: This Week in NixOS")] This Week in NixOS 23 | 24 | - [Week 4](http://compiletoi.net/this-week-in-nixos-4.html) 25 | - [Week 3](http://compiletoi.net/this-week-in-nixos-3.html) 26 | - [Week 2](http://compiletoi.net/this-week-in-nixos-3.html) 27 | - [Week 1](http://compiletoi.net/this-week-in-nixos-3.html) 28 | 29 | [[edit](/w/index.php?title=Project_Discussion_%26_Newsletters&action=edit§ion=6 "Edit section: Blogs & Social Networks")] Blogs & Social Networks 30 | ----------------------------------------------------------------------------------------------------------------------------------------------------- 31 | 32 | - [@NixOS\_org](https://twitter.com/nixos_org) 33 | - [@NixOSTips](https://twitter.com/NixOsTips) 34 | - [Stream of Community Blogs - Planet NixOS](http://planet.nixos.org/) 35 | 36 | -------------------------------------------------------------------------------- /Security Updates.page: -------------------------------------------------------------------------------- 1 | When a new security update is committed to 2 | it might not be readily available in 3 | the nixos channel for multiple reasons: 4 | 5 | 1. A base library has been updated like openssl or libc, thus requiring 6 | a lot of packages to be rebuilt. This may take a few days in hydra 7 | or even by compiling everything by yourself on you server. 8 | 2. Even if all the packages were rebuilt in hydra, nixos tests may fail 9 | and thus the channel will not update. In this case you may use the 10 | hydra cache, but it's better to wait for tests to pass for obvious 11 | reasons. 12 | 13 | To overcome this issue, NixOS provides an option for replacing runtime 14 | dependencies of the system (note, not packages installed by nix-env) 15 | without the need to rebuild everything. 16 | 17 | Let's say we have to update openssl and that the update has landed in 18 | nixpkgs. First of all we want to get openssl from nixpkgs: 19 | 20 | cd /some/path 21 | git clone https://github.com/NixOS/nixpkgs 22 | 23 | Note that in pkgs/top-level/all-packages.nix openssl is called as: 24 | 25 | openssl = callPackage ../development/libraries/openssl { 26 | fetchurl = fetchurlBoot; 27 | cryptodevHeaders = linuxPackages.cryptodev.override { 28 | fetchurl = fetchurlBoot; 29 | onlyHeaders = true; 30 | }; 31 | }; 32 | 33 | Then we may put this in configuration.nix: 34 | 35 | system.replaceRuntimeDependencies = with pkgs; [ 36 | ({ original = openssl; 37 | replacement = callPackage /some/path/nixpkgs/pkgs/development/libraries/openssl { 38 | fetchurl = fetchurlBoot; 39 | cryptodevHeaders = linuxPackages.cryptodev.override { 40 | fetchurl = fetchurlBoot; 41 | onlyHeaders = true; 42 | }; 43 | }; 44 | }) 45 | ]; 46 | 47 | system.replaceRuntimeDependencies expects a list of attributes { 48 | original, replacement }. You may put several of those updates. It's 49 | important that the replacement derivation has the same name length of 50 | the original derivation (if it's not the case, an error will be reported 51 | before switching to the new configuration). 52 | 53 | Make sure you keep track of this update and to remove it once you 54 | upgrade to a nixos version that includes the update. 55 | 56 | -------------------------------------------------------------------------------- /Keymap.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Keymap&action=edit§ion=1 "Edit section: Changing your X keymap")] Changing your X keymap 2 | ----------------------------------------------------------------------------------------------------------------------- 3 | 4 | In your *configuration.nix* set the layout and the variant you want to 5 | use. If you want to use Programmer's Dvorak then you would use the 6 | **us** layout with **dvp** variety: 7 | 8 | services.xserver.layout = "us"; 9 | services.xserver.xkbVariant = "dvp"; 10 | 11 | This follows the regular **setxkbmap** syntax. Rebuild and restart X. 12 | You can use setxkbmap for temporary solution. 13 | 14 | If you're using a desktop environment such as KDE, you can probably use 15 | that to set your keymap but you'll have problems if you ever stop using 16 | that particular desktop environment. 17 | 18 | ### [[edit](/w/index.php?title=Keymap&action=edit§ion=2 "Edit section: Compose key")] Compose key 19 | 20 | Use '**xkbOptions'**: 21 | 22 | services.xserver.xkbOptions = "compose:caps"; 23 | 24 | The above would override the Caps-Lock key with Compose key behaviour. 25 | 26 | As usual, remember that you can use **nixos-option services.xserver** to 27 | check available options as well as **man configuration.nix**. 28 | 29 | [[edit](/w/index.php?title=Keymap&action=edit§ion=3 "Edit section: Changing your virtual console keymap")] Changing your virtual console keymap 30 | --------------------------------------------------------------------------------------------------------------------------------------------------- 31 | 32 | If you don't boot straight into a graphical session, the chances are 33 | you'll want to change your keymap and possibly locale. You can do this 34 | with **i18n** block in your *configuration.nix*. The **kbd** package 35 | provides many keymaps for you to use 36 | 37 | i18n = { 38 | consoleKeyMap = "dvorak; 39 | defaultLocale = "en_US.UTF-8"; 40 | }; 41 | 42 | Notably, **consoleKeyMap** can point to a file but you have to make sure 43 | it's available early on in the boot process (so don't put it on a 44 | network share you mount later). I point mine to a keymap in my home 45 | directory as it is not provided by **kbd** package. 46 | 47 | consoleKeyMap = "/home/shana/keymaps/dvp-1_2_1.map.gz"; 48 | 49 | The syntax is the same as the one accepted by **loadkeys** command (from 50 | **kbd** package) 51 | 52 | -------------------------------------------------------------------------------- /Nix Hackfest: 2012-08 22nd to 26th Augsburg.page: -------------------------------------------------------------------------------- 1 | Leave a comment here if you are interested in attending a 2 | [hackfest](http://en.wikipedia.org/wiki/Hackathon) in Augsburg (or 3 | possibly Munich), Germany (22nd-26th August?) or participating remotely. 4 | Include your name or nick and mention what you would like to work on in 5 | particular. Try to include some detail if the topic requires an 6 | introduction for others, pointers to mailing list discussions, tickets 7 | etc. could also be helpful. We don't all have to work on the same thing, 8 | but it is good to take advantage of having people around to flesh things 9 | out. 10 | 11 | goibhniu  12 | : Improve python support, PTS 13 | garbas  14 | : Improve python support 15 | yournick  16 | : your topic(s) of interest 17 | 18 | [[edit](/w/index.php?title=Nix_Hackfest:_2012-08_22nd_to_26th_Augsburg&action=edit§ion=1 "Edit section: Improve python support")] Improve python support 19 | ------------------------------------------------------------------------------------------------------------------------------------------------------------ 20 | 21 | Work on solving some of the following issues 22 | 23 | - Python package impurity (stop packages from trying to install 24 | dependencies) 25 | - Run the package tests (currently most of them are disabled because 26 | they don't work) 27 | - Write nix tests which test that the python modules work (to some 28 | degree) 29 | - Look at generating nix expressions from pypi (see MarcWeber's work 30 | on this) 31 | 32 | - 33 | - (python branch) 34 | - 35 | 36 | [[edit](/w/index.php?title=Nix_Hackfest:_2012-08_22nd_to_26th_Augsburg&action=edit§ion=2 "Edit section: Package Tracking System")] Package Tracking System 37 | -------------------------------------------------------------------------------------------------------------------------------------------------------------- 38 | 39 | If I understand correctly the idea is to create some utilities to test 40 | the kwalitee of Nix package expressions, perhaps tied in with additional 41 | metadata. Aszlig mentioned it on IRC: 42 | 43 | 44 | 45 | 46 | [Goibhniu](/w/index.php?title=User:Goibhniu&action=edit&redlink=1 "User:Goibhniu (page does not exist)") 47 | 22:42, 28 June 2012 (UTC) 48 | 49 | -------------------------------------------------------------------------------- /WICD.page: -------------------------------------------------------------------------------- 1 | I have a netbook which I use to connect to my WPA2-protected wifi 2 | network at home. Here is my experience of setting up wicd and wireless 3 | connection. 4 | 5 | ### [[edit](/w/index.php?title=WICD&action=edit§ion=1 "Edit section: Check the hardware")] Check the hardware 6 | 7 | Check that your wireless adapter is working 8 | 9 | [root@pokemon:~]# ifconfig -a | grep -A 5 wlan 10 | wlan0 Link encap:Ethernet HWaddr 00:16:EB:19:DC:A0 11 | BROADCAST MULTICAST MTU:1500 Metric:1 12 | RX packets:25756 errors:0 dropped:0 overruns:0 frame:0 13 | TX packets:22685 errors:0 dropped:0 overruns:0 carrier:0 14 | collisions:0 txqueuelen:1000 15 | RX bytes:7196191 (6.8 Mb) TX bytes:7611727 (7.2 Mb) 16 | 17 | If not, consult dmesg. One possible reason is missing firmware. 18 | Sometimes you may need to enable it explicitly, see 19 | networking.enableIntel2100BGFirmware option as an example. 20 | 21 | ### [[edit](/w/index.php?title=WICD&action=edit§ion=2 "Edit section: Enable wicd, disable other networking")] Enable wicd, disable other networking 22 | 23 | Wicd is fully-functional network manager, it takes responsibility for 24 | connecting, launching dhcp clients, storing passwords, etc. To prevent 25 | conflicts, disable other network agents 26 | 27 | networking = { 28 | ... 29 | interfaceMonitor.enable = false; 30 | wireless.enable = false; # Don't run wpa_supplicant (wicd will do it when necessary) 31 | useDHCP = false; # Don't run dhclient on wlan0 32 | wicd.enable = true; 33 | ... 34 | }; 35 | 36 | (Roconnor 2012-08-13: setting useDHCP to false breaks for me in that 37 | wicd never sets the DNS server. Sergey 2013-06: confirm, that seems to 38 | be a dhcpcd issue. Wicd better works with dhclient.) 39 | 40 | ### [[edit](/w/index.php?title=WICD&action=edit§ion=3 "Edit section: Setup wicd")] Setup wicd 41 | 42 | Now rebuild nixos, switch to new configuration and launch the gui. 43 | 44 | $ wicd-gtk 45 | 46 | Notes: 47 | 48 | - If it doesn't see wireless networks, open preferences and check 49 | wireless interface name. Enter correct value (like "wlan0") if 50 | needed. 51 | - Currently, wicd works better with dhclient backend rather than with 52 | dhcpcd. dhclient can be enabled in the 'External programs' tab. 53 | 54 | That's it. Now use gui to find your network, enter passwords and connect 55 | to it. 56 | 57 | -------------------------------------------------------------------------------- /Pull request.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Pull_request&action=edit§ion=1 "Edit section: What is a github pull request ?")] What is a github pull request ? 2 | ----------------------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | Its a way to tell a github project that you've created some changes. 5 | Maintainers can easily review, comment on and merge your changes. 6 | 7 | [[edit](/w/index.php?title=Pull_request&action=edit§ion=2 "Edit section: How to create a git pull request")] How to create a git pull request 8 | ------------------------------------------------------------------------------------------------------------------------------------------------- 9 | 10 | 1\) Create a github account and fork nixpks/nixos/... repository. 11 | 12 | 2\) On you host, create a new remote location: 13 | 14 | # add your github clone as remote location: 15 | YOUR_GITHUB_NAME=fill-in 16 | git remote add $YOUR_GITHUB_NAME "git@github.com:$YOUR_GITHUB_NAME/nixpkgs.git" 17 | 18 | 3\) git commit your change 19 | 20 | git add FILE_LIST # eventually use git add --patch 21 | git commit 22 | 23 | # verify everything is ok - no unexpected dangling files git does not know about yet: 24 | git status 25 | 26 | 4\) submitting your change, push to your repository: 27 | 28 | # recommended: create a topic branch, so that this change 29 | # can be submitted independently from other patches: 30 | git checkout -tb submit/your-topic-name 31 | git push $YOUR_GITHUB_NAME submit/your-topic-name 32 | 33 | goto gituhb.com/your\_name -\> create pull request 34 | 35 | Why create your own branch? You can follow upstream (master) by running 36 | "git merge master". You can "git commit --amend" fixes and "git push -f" 37 | your branch. You can always switch back to master by "git checkout 38 | master". 39 | 40 | For long living topic branches you may want to read 41 | [Nixpkgs\_and\_TopGit](//Nixpkgs and TopGit) which allows to squash many 42 | changes so that patches will always be easy to review. 43 | 44 | [[edit](/w/index.php?title=Pull_request&action=edit§ion=3 "Edit section: Also See")] Also See 45 | ------------------------------------------------------------------------------------------------- 46 | 47 | [Contributing\_to\_nixpkgs](//Contributing to nixpkgs) which contains a 48 | full guide about how to add and contribute a package 49 | 50 | -------------------------------------------------------------------------------- /Long-term open issues:build determinism.page: -------------------------------------------------------------------------------- 1 | What are the builder-accessible pieces of information that can lead to 2 | repeated build producing bit-for-bit different outputs? 3 | 4 | [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=1 "Edit section: Not addressed completely")] Not addressed completely 5 | ------------------------------------------------------------------------------------------------------------------------------------------------------------ 6 | 7 | ### [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=2 "Edit section: System time")] System time 8 | 9 | Additional problem: ctime on files, if build creates any archives 10 | 11 | #### [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=3 "Edit section: Ways to fix the problem")] Ways to fix the problem 12 | 13 | ##### [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=4 "Edit section: LD PRELOAD")] LD\_PRELOAD 14 | 15 | Works only for dynamically-linked programs 16 | 17 | ##### [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=5 "Edit section: ptrace")] ptrace 18 | 19 | Slower? 20 | 21 | ### [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=6 "Edit section: System CPU model/features")] System CPU model/features 22 | 23 | ### [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=7 "Edit section: Order of directory entries")] Order of directory entries 24 | 25 | ls -u giving different order may lead to things like jars being not 26 | bit-for-bit identical 27 | 28 | ### [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=8 "Edit section: Deliberate randomness")] Deliberate randomness 29 | 30 | Example: package generating a andom seed during build. It is a problem 31 | from many points of view. 32 | 33 | [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=9 "Edit section: Allegedely fixed (at least in Nix on NixOS)")] Allegedely fixed (at least in Nix on NixOS) 34 | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 35 | 36 | ### [[edit](/w/index.php?title=Long-term_open_issues:build_determinism&action=edit§ion=10 "Edit section: Builder PIDs")] Builder PIDs 37 | -------------------------------------------------------------------------------- /Nix Hackfest: 2012-07 20th to 22nd.page: -------------------------------------------------------------------------------- 1 | Munich, exact location to be announced. 2 | 3 | Leave a comment here if you are interested in attending a 4 | [hackfest](http://en.wikipedia.org/wiki/Hackathon) or participating 5 | remotely. Include your name or nick and mention what you would like to 6 | work on in particular. Try to include some detail if the topic requires 7 | an introduction for others, pointers to mailing list discussions, 8 | tickets etc. could also be helpful. We don't all have to work on the 9 | same thing, but it is good to take advantage of having people around to 10 | flesh things out. 11 | 12 | goibhniu  13 | : Improve python support 14 | chaoflow  15 | : Improve python support 16 | qknight   17 | : Improve python support 18 | yournick  19 | : your topic(s) of interest 20 | 21 | [[edit](/w/index.php?title=Nix_Hackfest:_2012-07_20th_to_22nd&action=edit§ion=1 "Edit section: Improve python support")] Improve python support 22 | --------------------------------------------------------------------------------------------------------------------------------------------------- 23 | 24 | Work on solving some of the following issues 25 | 26 | - Python package impurity (stop packages from trying to install 27 | dependencies) 28 | - Run the package tests (currently most of them are disabled because 29 | they don't work) 30 | - Write nix tests which test that the python modules work (to some 31 | degree) 32 | - Look at generating nix expressions from pypi (see MarcWeber's work 33 | on this) 34 | 35 | - 36 | - (python branch) 37 | - 38 | 39 | Known issues: 40 | 41 | - Overzealous wrapPythonPrograms, also wraps included modules (just 42 | use wrapProgram?) 43 | 44 | Considerations: 45 | 46 | - Should we use distribute as the basis for installing python 47 | packages? 48 | 49 | Tasks 50 | 51 | - Merging of python fork 52 | - Documents: Improve Section 5.2 on 53 | 54 | to provide an example of a good package 55 | - Easy to use python environment, e.g. for Plone 56 | - Python purity 57 | - Problematic python packages: numpy, mathplotlib etc. : 58 | 59 | - Consider how to generate nix expressions for python package (see 60 | garbas' repo) 61 | 62 | -------------------------------------------------------------------------------- /PulseAudio.page: -------------------------------------------------------------------------------- 1 | *Note:* This page is work in progress. Until finished it is only of 2 | limited usefulness. 3 | 4 | [[edit](/w/index.php?title=PulseAudio&action=edit§ion=1 "Edit section: Network")] Network 5 | ============================================================================================= 6 | 7 | Server: server, 192.168.0.1 Client: client, 8 | 9 | Server configuration. 10 | 11 | server $ cat ~/.pulse/default.pa 12 | load-module module-augment-properties 13 | load-module module-null-sink 14 | load-module module-always-sink 15 | load-module module-udev-detect 16 | 17 | load-module module-device-restore 18 | load-module module-stream-restore 19 | load-module module-card-restore 20 | load-module module-default-device-restore 21 | 22 | load-module module-native-protocol-unix 23 | load-module module-native-protocol-tcp 24 | 25 | server $ pulseaudio 26 | 27 | Client configuration. 28 | 29 | client $ cat ~/.pulse/default.pa 30 | load-module module-augment-properties 31 | load-module module-null-sink 32 | load-module module-always-sink 33 | load-module module-udev-detect 34 | 35 | load-module module-device-restore 36 | load-module module-stream-restore 37 | load-module module-card-restore 38 | load-module module-default-device-restore 39 | 40 | load-module module-native-protocol-unix 41 | load-module module-native-protocol-tcp 42 | 43 | client $ echo default-server 192.168.0.1 >> ~/.pulse/client.conf 44 | 45 | client $ scp server:.pulse-cookie .pulse-cookie 46 | client $ pulseaudio 47 | 48 | [[edit](/w/index.php?title=PulseAudio&action=edit§ion=2 "Edit section: Applications")] Applications 49 | ======================================================================================================= 50 | 51 | [[edit](/w/index.php?title=PulseAudio&action=edit§ion=3 "Edit section: MPlayer")] MPlayer 52 | --------------------------------------------------------------------------------------------- 53 | 54 | Enable Pulse Audio support in MPlayer. 55 | 56 | $ cat <) {}; 59 | in 60 | pkgs.MPlayer.override { pulseSupport = true; } 61 | EOF > ~/.nix-defexpr/mplayer.nix 62 | 63 | Install MPlayer with Pulse Audio support. 64 | 65 | $ nix-env -iA mplayer 66 | 67 | Make Pulse Audio the default output device. 68 | 69 | $ echo ao=pulse >> ~/.mplayer/config 70 | -------------------------------------------------------------------------------- /NixOS As OS X Guest.page: -------------------------------------------------------------------------------- 1 | ***THIS PAGE IS CURRENTLY A WORK IN PROGRESS*** 2 | 3 | * * * * * 4 | 5 | This tutorial (will) describe how to install NixOS as a guest OS via 6 | Virtualbox, and specifically on getting a GUI up and running. Many parts 7 | of it are likely not specific to Macs, but nevertheless that is the 8 | focus of this article. 9 | 10 | I am on a 64-bit MacBook Pro, so on 32-bit systems modifications may be 11 | neccesary. 12 | 13 | [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=1 "Edit section: STARTED Setup VM")] STARTED Setup VM 14 | ------------------------------------------------------------------------------------------------------------------------ 15 | 16 | ### [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=2 "Edit section: Install VirtualBox")] Install VirtualBox 17 | 18 | VirtualBox is available from . Installing it 19 | should be more or less straightforward. 20 | 21 | ### [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=3 "Edit section: STARTED Create VM")] STARTED Create VM 22 | 23 | Open the VirtualBox application and create a new VM, which will bring up 24 | the "New Virtual Machine Wizard". 25 | 26 | Name 27 | : XNix 28 | OS Type 29 | : Linux 2.6 (64bit) 30 | 31 | [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=4 "Edit section: TODO Install NixOS")] TODO Install NixOS 32 | ---------------------------------------------------------------------------------------------------------------------------- 33 | 34 | ### [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=5 "Edit section: TODO Partition drive")] TODO Partition drive 35 | 36 | ### [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=6 "Edit section: TODO Create system description file")] TODO Create system description file 37 | 38 | ### [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=7 "Edit section: TODO Build system")] TODO Build system 39 | 40 | [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=8 "Edit section: TODO Setup NixOS")] TODO Setup NixOS 41 | ------------------------------------------------------------------------------------------------------------------------ 42 | 43 | ### [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=9 "Edit section: TODO Setup users")] TODO Setup users 44 | 45 | ### [[edit](/w/index.php?title=NixOS_As_OS_X_Guest&action=edit§ion=10 "Edit section: TODO Other Stuff To Be Determined")] TODO Other Stuff To Be Determined 46 | -------------------------------------------------------------------------------- /Samba on nix.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Samba_on_nix&action=edit§ion=1 "Edit section: motivation")] motivation 2 | ----------------------------------------------------------------------------------------------------- 3 | 4 | this guide will help you on how to use samba on nixos. 5 | 6 | [[edit](/w/index.php?title=Samba_on_nix&action=edit§ion=2 "Edit section: excerpt of /etc/nixos/configuration.nix")] excerpt of /etc/nixos/configuration.nix 7 | --------------------------------------------------------------------------------------------------------------------------------------------------------------- 8 | 9 | services.samba.enable = true; 10 | services.samba.securityType = "share"; 11 | services.samba.extraConfig = '' 12 | workgroup = WORKGROUP 13 | server string = smbnix 14 | netbios name = smbnix 15 | security = share 16 | #use sendfile = yes 17 | #max protocol = smb2 18 | 19 | [rw-files] 20 | comment = Temporary rw files 21 | path = /storage 22 | read only = no 23 | writable = yes 24 | public = yes 25 | ''; 26 | 27 | If your firewall is enabled, or if you want to consider enabling it: 28 | 29 | networking.firewall.enable = true; 30 | networking.firewall.allowPing = true; 31 | networking.firewall.allowedTCPPorts = [ 445 139 ]; 32 | networking.firewall.allowedUDPPorts = [ 137 138 ]; 33 | 34 | [[edit](/w/index.php?title=Samba_on_nix&action=edit§ion=3 "Edit section: afterwards apply the changes made to configuration.nix")] afterwards apply the changes made to configuration.nix 35 | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 36 | 37 | nixos-rebuild switch 38 | 39 | samba should startup afterwards 40 | 41 | [[edit](/w/index.php?title=Samba_on_nix&action=edit§ion=4 "Edit section: stopping/restarting the services")] stopping/restarting the services 42 | ------------------------------------------------------------------------------------------------------------------------------------------------- 43 | 44 | stop samba 45 | start samba 46 | restart samba 47 | 48 | [[edit](/w/index.php?title=Samba_on_nix&action=edit§ion=5 "Edit section: links")] links 49 | ------------------------------------------------------------------------------------------- 50 | 51 | - 52 | 53 | -------------------------------------------------------------------------------- /Soft-RAID mdadm (/dev/md0), LVM (PVs,VGs,LVs).page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Soft-RAID_mdadm_(/dev/md0),_LVM_(PVs,VGs,LVs)&action=edit§ion=1 "Edit section: what is this")] what is this 2 | ------------------------------------------------------------------------------------------------------------------------------------------ 3 | 4 | this short guide helps to create a suitable setup to have LVM on top of 5 | a mdadm soft raid. a closely related article is 6 | [Encrypted\_Root\_on\_NixOS](//Encrypted Root on NixOS) 7 | 8 | [[edit](/w/index.php?title=Soft-RAID_mdadm_(/dev/md0),_LVM_(PVs,VGs,LVs)&action=edit§ion=2 "Edit section: how does it work")] how does it work 9 | -------------------------------------------------------------------------------------------------------------------------------------------------- 10 | 11 | it is possible (at least in the virtualbox virtual machine i installed 12 | to verify it) to boot from a boot LV which is located on top of a mdadm 13 | soft raid. 14 | 15 | i was using: **nixos-minimal-0.1pre27077-x86\_64-linux.iso** 16 | 17 | this chain of commands illustrates that: 18 | 19 | mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1 20 | 21 | pvcreate /dev/md0 22 | vgcreate myvolgrp /dev/md0 23 | lvcreate -L 1G -n boot myvolgrp 24 | lvcreate -L 5G -n system myvolgrp 25 | 26 | mkfs.ext4 -n boot /dev/myvolgrp/boot 27 | mkfs.ext4 -n system /dev/myvolgrp/system 28 | 29 | mount -L system /mnt 30 | nixos-generate-config --root /mnt 31 | nixos-option --install 32 | 33 | vi /etc/nixos/configuration.nix 34 | ... 35 | { mountPoint = "/"; 36 | label="system"; 37 | } 38 | { mountPoint = "/boot"; 39 | label="boot"; 40 | } 41 | 42 | 43 | nixos-install 44 | reboot 45 | 46 | this implies that: 47 | 48 | - you don't need a /dev/sda1 boot partition anymore 49 | - you can boot from a mdadm device BUT 50 | - you can also boot from a LVM on top of a mdadm device 51 | 52 | **note:** still consider turning of the disk caches when using 53 | soft-raids 54 | 55 | [[edit](/w/index.php?title=Soft-RAID_mdadm_(/dev/md0),_LVM_(PVs,VGs,LVs)&action=edit§ion=3 "Edit section: links")] links 56 | ---------------------------------------------------------------------------------------------------------------------------- 57 | 58 | - 59 | - 60 | 61 | -------------------------------------------------------------------------------- /Tips for learning the Nix expression language and debugging nix expressions.page: -------------------------------------------------------------------------------- 1 | The intention of this article is to provide a walk through tutorial for 2 | the Nix expression language in addition to practical tips and advice for 3 | writing and debugging Nix expressions. The canonical documentation is 4 | the [Nix Users 5 | Manual](http://hydra.nixos.org/job/nix/trunk/tarball/latest/download-by-type/doc/manual%7C). 6 | Please refer to *5.2. The Nix expression language* for further details. 7 | 8 | - UPDATE\*: There is the package \`nix-repl\` now for interactively 9 | working with Nix. 10 | 11 | [[edit](/w/index.php?title=Tips_for_learning_the_Nix_expression_language_and_debugging_nix_expressions&action=edit§ion=1 "Edit section: The Nix Expression Language")] The Nix Expression Language 12 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 13 | 14 | There isn't an interactive interpreter for Nix, but \`nix-instantiate 15 | --eval-only -\` can be used to quickly test an expression: 16 | 17 | $ nix-instantiate --eval-only - 18 | rec {x = 123;}.x 19 | 20 | 123 21 | 22 | \`nix-instantiate --eval-only example.nix\` will evaluate the expression 23 | in example.nix and print the result. Using --xml will provide an xml 24 | representation of the output which can provide more details. 25 | 26 | example.nix: 27 | 28 | {x = import (/etc/nixos/nixpkgs/pkgs/tools/graphics/graphviz);}.x 29 | 30 | $ nix-instantiate --eval-only example.nix 31 | 32 | 33 | $ nix-instantiate --eval-only --xml example.nix 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | example.nix 56 | 57 | rec { 58 | x = import (/etc/nixos/nixpkgs/pkgs/tools/graphics/graphviz); 59 | y = builtins.isFunction x; 60 | }.y 61 | 62 | $ nix-instantiate --eval-only example.nix 63 | true 64 | -------------------------------------------------------------------------------- /Deprecated packages.page: -------------------------------------------------------------------------------- 1 | This page contains information about various deprecated packages and 2 | their reverse-dependencies. 3 | 4 | [[edit](/w/index.php?title=Deprecated_packages&action=edit§ion=1 "Edit section: HAL")] HAL 5 | ---------------------------------------------------------------------------------------------- 6 | 7 | Package 8 | 9 | Maintainer 10 | 11 | Why package needs HAL 12 | 13 | Plan 14 | 15 | [nut](http://www.networkupstools.org/) 16 | 17 | Nicolas Pierron 18 | 19 | Added nut-2.6.3 without hal support 20 | 21 | Xfce-4.6 22 | 23 | No meta.maintainer 24 | 25 | Switch to 4.8 and remove 4.6 26 | 27 | [[edit](/w/index.php?title=Deprecated_packages&action=edit§ion=2 "Edit section: Policykit (not polkit!)")] Policykit (not polkit!) 28 | -------------------------------------------------------------------------------------------------------------------------------------- 29 | 30 | -------------------------------------------------------------------------- 31 | Package 32 | Maintainer 33 | Plan 34 | ------------------------ ------------------------ ------------------------ 35 | HAL 36 | No meta.maintainer 37 | Remove (see above) 38 | -------------------------------------------------------------------------- 39 | 40 | [[edit](/w/index.php?title=Deprecated_packages&action=edit§ion=3 "Edit section: Qt3/KDE3")] Qt3/KDE3 41 | -------------------------------------------------------------------------------------------------------- 42 | 43 | Qt 3.x and KDE 3.x are not supported by Nokia and KDE team. Most 44 | packages migrated to KDE 4.x. If we cannot avoid using qt-3.x and/or 45 | kde-3.x, look at [trinity project](http://www.trinitydesktop.org/). 46 | 47 | The list of Qt3 reverse dependencies 48 | 49 | Package 50 | 51 | Alternative 52 | 53 | Plan 54 | 55 | qcad 56 | 57 | librecad 58 | 59 | (viric) I've it half packaged. 60 | 61 | taskjuggler 62 | 63 | (viric) The gui can be disabled in the build. 64 | 65 | twinkle 66 | 67 | (viric) I want it. That's the SIP program that worked best for me. 68 | ([7c6f434c](/w/index.php?title=User:7c6f434c&action=edit&redlink=1 "User:7c6f434c (page does not exist)")) 69 | I also want it.. It has the sanest just-IP mode of everything I tried. 70 | (urkud) probably, qt3 will stay just for twinkle... 71 | 72 | qucs 73 | 74 | (viric) They released on 12/2011, and look like keeping with qt3. I 75 | don't use it but I prefer it to stay. (urkud) They have qucs-qt4 branch. 76 | Didn't checked whether it works. 77 | 78 | games/six 79 | 80 | (falsifian) I use this sometimes; it's the only Linux program for 81 | playing the board game Hex that I know of. Certainly not a critical 82 | package though. 83 | 84 | -------------------------------------------------------------------------------- /Lenovo Thinkpad x200.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Lenovo_Thinkpad_x200&action=edit§ion=1 "Edit section: Lenovo ThinkPad X200")] Lenovo ThinkPad X200 2 | ================================================================================================================================= 3 | 4 | [[edit](/w/index.php?title=Lenovo_Thinkpad_x200&action=edit§ion=2 "Edit section: Overview")] Overview 5 | --------------------------------------------------------------------------------------------------------- 6 | 7 | ------------------------------------------------------------------------- 8 | Component 9 | Hardware 10 | ------------------------------------ ------------------------------------ 11 | Graphics Wireless 12 | Intel Mobile 4 Intel 5100 AGN 13 | ------------------------------------------------------------------------- 14 | 15 | : Hardware support 16 | 17 | [[edit](/w/index.php?title=Lenovo_Thinkpad_x200&action=edit§ion=3 "Edit section: Manual configuration")] Manual configuration 18 | --------------------------------------------------------------------------------------------------------------------------------- 19 | 20 | ### [[edit](/w/index.php?title=Lenovo_Thinkpad_x200&action=edit§ion=4 "Edit section: System Management Application Program Interface")] System Management Application Program Interface 21 | 22 | On the ThinkPad X200 some system information is made available through 23 | the System Management Application Program Interface (SMAPI) instead of 24 | the Advanced Configuration and Power Interface (ACPI) or Advanced Power 25 | Management (APM). This mostly concernes more detailed battery and 26 | improved accellerometer information. 27 | 28 | For this to work you need to add tp\_smapi to the 29 | boot.extraModulePackages option and also specify the tp\_smapi module in 30 | boot.kernelModules in /etc/nixos/configuration.nix. 31 | 32 | boot.kernelModules = [ ... "tp_smapi" ]; 33 | boot.extraModulePackages = [ ... config.boot.kernelPackages.tp_smapi ]; 34 | 35 | Then rebuild your system using the nixos-rebuild command. [Lenovo 36 | W540](http://www.youtube.com/watch?v=9igP27En4M0) 37 | 38 | You can find additional information about the tp\_smapi module in the 39 | [ThinkPad Wiki](http://www.thinkwiki.org/wiki/Tp_smapi). 40 | 41 | [[edit](/w/index.php?title=Lenovo_Thinkpad_x200&action=edit§ion=5 "Edit section: Tips & Tricks")] Tips & Tricks 42 | ------------------------------------------------------------------------------------------------------------------- 43 | 44 | ### [[edit](/w/index.php?title=Lenovo_Thinkpad_x200&action=edit§ion=6 "Edit section: Disable speaker")] Disable speaker 45 | 46 | Add this to your /etc/nixos/configuration.nix. 47 | 48 | boot.blacklistedKernelModules = [ "pcspkr" ]; 49 | -------------------------------------------------------------------------------- /Special:Random.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Emacs_configuration&action=edit§ion=1 "Edit section: Find elisp modules in standard profiles (outdated for NixOS)")] Find elisp modules in standard profiles (outdated for NixOS) 2 | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | (setq load-path (append (list "~/.nix-profile/share/emacs/site-lisp" "/run/current-system/sw/share/emacs/site-lisp") load-path)) 5 | 6 | This should NO LONGER BE NEEDED on NixOS, because for a while, the emacs 7 | expression installs a site-start.el that uses NIX\_PROFILES as base for 8 | extending the load-path. 9 | 10 | However, when using an emacs not from nixpkgs, you may still need a 11 | similar expression. 12 | 13 | [[edit](/w/index.php?title=Emacs_configuration&action=edit§ion=2 "Edit section: Tramp")] Tramp 14 | -------------------------------------------------------------------------------------------------- 15 | 16 | Tramp needs to call \`ls\` and \`id\` but it will not find them on a 17 | NixOS machine without additional configuration because they are not in 18 | the usual places. To fix this you can add the following to your 19 | \~/.emacs 20 | 21 | (require 'tramp) 22 | (add-to-list 'tramp-remote-path "/run/current-system/sw/bin") 23 | 24 | You can then edit local files as root e.g. 25 | 26 | C-x C-f /su::/etc/nixos/configuration.nix 27 | 28 | To login to a remote NixOS machine which uses port 1234 for ssh: 29 | 30 | C-x C-f /ssh:username@hostname#1234:/ 31 | 32 | [[edit](/w/index.php?title=Emacs_configuration&action=edit§ion=3 "Edit section: Enable Nix mode")] Enable Nix mode 33 | ---------------------------------------------------------------------------------------------------------------------- 34 | 35 | The library is in the file 36 | `/run/current-system/sw/share/emacs/site-lisp/nix-mode.el`. 37 | 38 | Load the library with `M-x load-librarynix-mode`, and then 39 | enable the mode for the current buffer with `M-x nix-mode`. 40 | 41 | Add to .emacs with the following line: 42 | 43 | (require 'nix-mode) 44 | 45 | This loads the library on every startup, and installs mode hooks that 46 | enables the mode for files with a file name extension *.nix*, or 47 | *.nix.in*. 48 | 49 | Or, if lazy loading of the library is preferred, add to .emacs the 50 | following lines: 51 | 52 | (autoload 'nix-mode "nix-mode" "Major mode for editing Nix expressions." t) 53 | (push '("\\.nix\\'" . nix-mode) auto-mode-alist) 54 | (push '("\\.nix.in\\'" . nix-mode) auto-mode-alist) 55 | 56 | The first line makes the command `nix-mode` automatically load the 57 | library, and the last two install the same file name extensions as above 58 | in the mode hooks. 59 | 60 | -------------------------------------------------------------------------------- /Emacs configuration.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Emacs_configuration&action=edit§ion=1 "Edit section: Find elisp modules in standard profiles (outdated for NixOS)")] Find elisp modules in standard profiles (outdated for NixOS) 2 | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | (setq load-path (append (list "~/.nix-profile/share/emacs/site-lisp" "/run/current-system/sw/share/emacs/site-lisp") load-path)) 5 | 6 | This should NO LONGER BE NEEDED on NixOS, because for a while, the emacs 7 | expression installs a site-start.el that uses NIX\_PROFILES as base for 8 | extending the load-path. 9 | 10 | However, when using an emacs not from nixpkgs, you may still need a 11 | similar expression. 12 | 13 | [[edit](/w/index.php?title=Emacs_configuration&action=edit§ion=2 "Edit section: Tramp")] Tramp 14 | -------------------------------------------------------------------------------------------------- 15 | 16 | Tramp needs to call \`ls\` and \`id\` but it will not find them on a 17 | NixOS machine without additional configuration because they are not in 18 | the usual places. To fix this you can add the following to your 19 | \~/.emacs 20 | 21 | (require 'tramp) 22 | (add-to-list 'tramp-remote-path "/run/current-system/sw/bin") 23 | 24 | You can then edit local files as root e.g. 25 | 26 | C-x C-f /su::/etc/nixos/configuration.nix 27 | 28 | To login to a remote NixOS machine which uses port 1234 for ssh: 29 | 30 | C-x C-f /ssh:username@hostname#1234:/ 31 | 32 | [[edit](/w/index.php?title=Emacs_configuration&action=edit§ion=3 "Edit section: Enable Nix mode")] Enable Nix mode 33 | ---------------------------------------------------------------------------------------------------------------------- 34 | 35 | The library is in the file 36 | `/run/current-system/sw/share/emacs/site-lisp/nix-mode.el`. 37 | 38 | Load the library with `M-x load-librarynix-mode`, and then 39 | enable the mode for the current buffer with `M-x nix-mode`. 40 | 41 | Add to .emacs with the following line: 42 | 43 | (require 'nix-mode) 44 | 45 | This loads the library on every startup, and installs mode hooks that 46 | enables the mode for files with a file name extension *.nix*, or 47 | *.nix.in*. 48 | 49 | Or, if lazy loading of the library is preferred, add to .emacs the 50 | following lines: 51 | 52 | (autoload 'nix-mode "nix-mode" "Major mode for editing Nix expressions." t) 53 | (push '("\\.nix\\'" . nix-mode) auto-mode-alist) 54 | (push '("\\.nix.in\\'" . nix-mode) auto-mode-alist) 55 | 56 | The first line makes the command `nix-mode` automatically load the 57 | library, and the last two install the same file name extensions as above 58 | in the mode hooks. 59 | 60 | -------------------------------------------------------------------------------- /Nix(OS) in the media and presentations.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Nix(OS)_in_the_media_and_presentations&action=edit§ion=1 "Edit section: Videos")] Videos 2 | ======================================================================================================================= 3 | 4 | - NixOS: declarative configuration Linux distribution (by Domen 5 | Kožar), 01. Feb 2014 6 | [FOSDEM14](http://www.youtube.com/watch?v=seP79xX9FsE) 7 | - NixOS Operating System: Declarative Configuration Distribution (by 8 | Domen Kožar), 06. Jul 2013 9 | [EuroPython2013](http://www.youtube.com/watch?v=DtOBROowzDg) 10 | - [Solvene] NixOS - popolnoma funkcijski upravljalec sistemske 11 | konfiguracije (by Rok Garbas), 05. Feb 2013 12 | [kiberpipa](https://www.kiberpipa.org/sl/event/nixos-popolnoma-funkcijski-upravljalec-sistemske-konfiguracije-rok-garbas-1782/) 13 | - LinuxDays 2012 in Prague: [Nix(OS) purely functional package 14 | management](http://blip.tv/episode/6410568) 15 | - Using NixOS for declarative deployment and testing (by Sander van 16 | der Burg) [FOSDEM 17 | 2011](http://blip.tv/opensuse/using-nixos-for-declarative-deployment-and-testing-sander-van-der-burg-4744810) 18 | [slides](http://www.st.ewi.tudelft.nl/~sander/pdf/talks/vanderburg11-fosdem.pdf) 19 | - NixOS' Configuration system (by Nicolas Pierron) [FOSDEM 20 | 2010](http://meetings-archive.debian.net/pub/debian-meetings/2010/fosdem10/) 21 | [slides](http://nbp.name/dl/fosdem-2010-slides.pdf) 22 | - The Nix Package Manager (by Dr. Eelco Dolstra). GNU Hackers Meeting 23 | 2009, Gothenburg, Sweden, 12 November 2009. 24 | [pdf](http://nixos.org/~eelco/talks/ghm-nov-2009.pdf) 25 | [video](http://audio-video.gnu.org/video/ghm2009/ghm2009-dolstra-large.ogg) 26 | - [Catalan] Presentacio de nix/nixpkgs/nixos/hydra a la SummerCamp'09 27 | Garrotxa (by Lluis Batlle): [1a 28 | part](http://www.channels.com/episodes/show/7086930/Lluis-Nixos-1a-part) 29 | [2a 30 | part](http://www.channels.com/episodes/show/7077438/Lluis-Nixos-2a-part) 31 | [slides](http://www.associacio-aoe.org/scg/charlas/scg09/nixos/) 32 | - 33 | [slides](http://moritz.twoticketsplease.de/sigint-2013/) 34 | - NixOS Zidanca Sprint (by Dr. Eelco Dolstra) 35 | 36 | 37 | [[edit](/w/index.php?title=Nix(OS)_in_the_media_and_presentations&action=edit§ion=2 "Edit section: Articles")] Articles 38 | =========================================================================================================================== 39 | 40 | - [French] La naissance d'une distribution: NixOS (by Nicolas Pierron) 41 | [Programmez! 128, page 42 | 42](http://www.programmez.com/magazine.php?num_magazine=128) 43 | 44 | -------------------------------------------------------------------------------- /How to enable subpixel rendering in freetype.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=How_to_enable_subpixel_rendering_in_freetype&action=edit§ion=1 "Edit section: Why")] Why 2 | ======================================================================================================================= 3 | 4 | Nixos doesn't enable subpixel rendering by default because it is covered 5 | by patents. From the FreeType source code: 6 | 7 | Note that this feature is covered by several Microsoft 8 | patents and should not be activated in any default 9 | build of the library. 10 | 11 | [[edit](/w/index.php?title=How_to_enable_subpixel_rendering_in_freetype&action=edit§ion=2 "Edit section: How to enable")] How to enable 12 | =========================================================================================================================================== 13 | 14 | The expression for FreeType in Nixpkgs takes an option 15 | `useEncumberedCode` which enables subpixel rendering. It is disabled by 16 | default because of patent issues. We could use `packageOverrides` to 17 | override the FreeType package with a version that has subpixel rendering 18 | enable, but we would have to locally rebuild almost all GUI packages. 19 | Instead, we will use a trick: 20 | 21 | 1. Build most of the system normally using the default FreeType. 22 | 2. Build a version of FreeType with subpixel rendering enabled. 23 | 3. Set LD\_LIBRARY\_PATH so the subpixel-enabled FreeType is preferred. 24 | 25 | The code snippets below all belong in `/etc/nixos/configuration.nix`. 26 | 27 | We use `packageOverrides` to define a new FreeType expression with a 28 | unique name and subpixel rendering enabled: 29 | 30 | nixpkgs.config.packageOverrides = pkgs: { 31 | freetype_subpixel = pkgs.freetype.override { 32 | useEncumberedCode = true; 33 | }; 34 | }; 35 | 36 | To ensure that our new freetype package is built and isn't garbage 37 | collected, we add it to the system environment: 38 | 39 | environment.systemPackages = [ pkgs.freetype_subpixel ]; 40 | 41 | Finally, we add the subpixel-enabled FreeType to `LD_LIBRARY_PATH`: 42 | 43 | environment.variables.LD_LIBRARY_PATH = [ "${pkgs.freetype_subpixel}/lib" ]; 44 | 45 | Rebuild the system and reboot. Your environment should look like this: 46 | 47 | $ env | grep LD_LIBR 48 | LD_LIBRARY_PATH=/nix/store/jxss54j52paqwns8zvm6mwr7f89ck7ya-freetype-2.4.4/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib 49 | 50 | [[edit](/w/index.php?title=How_to_enable_subpixel_rendering_in_freetype&action=edit§ion=3 "Edit section: Links")] Links 51 | =========================================================================================================================== 52 | 53 | - [Subpixel layout](http://www.lagom.nl/lcd-test/subpixel.php) 54 | - [Font testing page](http://www.infinality.net/files/font.html) 55 | 56 | Thanks Eelco for the idea. 57 | 58 | -------------------------------------------------------------------------------- /User Reviews.page: -------------------------------------------------------------------------------- 1 | This page list some blog entries, comments made by Nix / NixOS users or 2 | by other community members. The primary goal of this page is to track 3 | bad points and possible enhancements that can be done on these projects. 4 | This also provide us a way to analyse and improve our communication 5 | skills by adapting our talk to our audience. 6 | 7 | Do not take the content of the following links as granted. Some texts 8 | are not indexed inside this page because they do not add any valuable 9 | feedback. 10 | 11 | [[edit](/w/index.php?title=User_Reviews&action=edit§ion=1 "Edit section: Articles & Blogs & Comments")] Articles & Blogs & Comments 12 | ======================================================================================================================================= 13 | 14 | - 2013-12-30: 15 | 16 | 17 | - 2011-10-10: 18 | 19 | 20 | - 2011-01-19: 21 | 22 | 23 | - 2010-03-30: Dispelling some misconceptions (answer to LWN article 24 | from 2009-06-17) 25 | - 2010-03-30: 26 | 27 | - 2009-12-30: 28 | - 2009-12-29: 29 | 30 | 31 | - 2009-06-17: NixOS: purely functional system configuration management 32 | - 2009-06-17: 33 | 34 | - 2009-05-01: Exploring the Limits of Package Management with Nix 35 | - 2009-05-01: 36 | 37 | - 2009-03-03: 38 | 39 | - 2009-01-30: NixOS: A Distro Focused on Next-Generation Package 40 | Management 41 | - 2009-01-30: 42 | 43 | - 2009-02-03: 44 | 45 | - 2009-08-08: 46 | 47 | 48 | - 2008-06-26: 49 | 50 | 51 | - 2008-12-28: Install NixOS (Japanese) 52 | - 2008-12-28: 53 | 54 | - 2007-10-23: 55 | 56 | 57 | - 2007-04-06: NixOS: una distribuzione completamente funzionale 58 | - 2007-04-06: 59 | 60 | 61 | - 2007-04-01: NixOS: a Purely Functional Linux Distribution 62 | - 2007-04-01: 63 | 64 | - 2007-03-31: 65 | 66 | -------------------------------------------------------------------------------- /Hosting providers & NixOS.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Hosting_providers_%26_NixOS&action=edit§ion=1 "Edit section: Background")] Background 2 | -------------------------------------------------------------------------------------------------------------------- 3 | 4 | NixOS is using very recent software & kernels by default. If you try to 5 | install NixOS on virtualizing systems be prepared that you have to patch 6 | some libraries to make them work with older kernels. 7 | 8 | [[edit](/w/index.php?title=Hosting_providers_%26_NixOS&action=edit§ion=2 "Edit section: Hosting providers known to run NixOS")] Hosting providers known to run NixOS 9 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 10 | 11 | www.linode.com: 12 | 13 | - Rob Vermaas and Marc Weber are running NixOS on linode.com - see 14 | [Install NixOS on Linode](//Install NixOS on Linode). 15 | 16 | netcup.de: 17 | 18 | - Starting from January 2013 netcup provides KVM servers with support 19 | for custom ISO images. 20 | 21 | supremebytes.com: 22 | 23 | - KVM hosting with custom ISO images on 24 | 25 | 26 | [[edit](/w/index.php?title=Hosting_providers_%26_NixOS&action=edit§ion=3 "Edit section: NixOs experiences about other providers")] NixOs experiences about other providers 27 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 28 | 29 | I tried: 30 | 31 | - netcup.de: 32 | 33 | 34 | 35 | Support let's you use your init if you ask them. 36 | But Upstart is causing trouble. It dosn't recognize when jobs have finished or started. 37 | Thus you don't pass the start script. So you don't even start sshd. 38 | Thu Dec 17 2009: upstart-0.6.3 doesn't work either. (Outdated) 39 | 40 | 41 | - vc-server.de: 42 | 43 | 44 | 45 | If you remove /bin/cp your data is lost. Older but probably very stable kernels. 46 | I got a stystem running using some kind of bind mound magic keeping the original debian in place. 47 | However I gave up updating it. It's still running my irssi client and hosting my .git repositories. 48 | Eg I had to patch coreutils because touch failed. This was fixed in a newer corutils release. 49 | This actually means you can't use binaries at all. 50 | 51 | - OVH: 52 | 53 | 54 | 55 | Nice: You can use an API to switch to the rescue system, You probably can scale easily by API. 56 | You get kind of root server. Thus running virtualized systems yourself should be possible. 57 | NixOs booted in kvm mode (Qemu/ vnc like interface). However when upstart was started it restarted. 58 | When booting from hd the normal way nothing happened and I didn't know how to debug it. 59 | -------------------------------------------------------------------------------- /How to tweak Linux kernel config options.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=How_to_tweak_Linux_kernel_config_options&action=edit§ion=1 "Edit section: Adding options to the mainstream kernel")] Adding options to the mainstream kernel 2 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | Following config snippet asks Nix to add "CONFIG\_PPP\_FILTER y" option 5 | to the set of kernel options for current kernel. Of course, that would 6 | require Nix to rebuild the kernel locally. 7 | 8 | nixpkgs.config = { 9 | packageOverrides = pkgs: { 10 | stdenv = pkgs.stdenv // { 11 | platform = pkgs.stdenv.platform // { 12 | kernelExtraConfig = "PPP_FILTER y" ; 13 | }; 14 | }; 15 | }; 16 | }; 17 | 18 | [[edit](/w/index.php?title=How_to_tweak_Linux_kernel_config_options&action=edit§ion=2 "Edit section: Building the kernel with your own .config")] Building the kernel with your own .config 19 | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 | 21 | **Note: this section describes non-trivial operations.** 22 | 23 | **TODO: Rewrite the steps below assuming that nixpkgs tree is available 24 | read-only.** 25 | 26 | In order to build the completely different kernel, you will need to 27 | write your own kernel expression. 28 | 29 | - Obtain the .config file you want to build the kernel with (do the 30 | make menuconfig). 31 | - Write the nix expression for the kernel you want to build. The 32 | expression may use the buildLinux function declared in 33 | all-packages.nix. My version looks like the following: 34 | 35 | 36 | 37 | 38 | # File pkgs/my-linux.nix 39 | { stdenv, fetchurl, buildLinux } : 40 | 41 | buildLinux rec { 42 | 43 | version = "3.10.28"; 44 | 45 | src = fetchurl { 46 | url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; 47 | sha256 = "1blzvr3qywi8wxgl28zsn5djwgvw70yh3i6qjh2sz3zk9gnpd6mq"; 48 | }; 49 | 50 | configfile = /path/to/your/.config; 51 | 52 | allowImportFromDerivation = true; 53 | } 54 | 55 | Change the src according to your needs. 56 | 57 | - Modify pkgs/all-packages.nix. Add the following lines pointing to 58 | your expression 59 | 60 | 61 | 62 | my_linux = callPackage ../my-linux.nix { }; 63 | my_linuxPackages = recurseIntoAttrs (linuxPackagesFor pkgs.my_linux my_linuxPackages); 64 | 65 | - Change the boot.kernelPackages option in your NixOS configuration 66 | file. Point it to pkgs.my\_linuxPackages. 67 | 68 | Note, that at the moment, .config has to have support for modules. See 69 | [this 70 | thread](http://lists.science.uu.nl/pipermail/nix-dev/2014-March/012663.html) 71 | for details 72 | 73 | -------------------------------------------------------------------------------- /Nixpkgs-ruby-overlay.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Nixpkgs-ruby-overlay&action=edit§ion=1 "Edit section: nixpkgs-ruby-overlay")] nixpkgs-ruby-overlay 2 | ================================================================================================================================= 3 | 4 | Experimental "dump rubyforge to nix" implementation. It consists of 5 | 6 | 1\) A patch for nixpkgs adding the overlay feature (like gentoo). This 7 | allows maintaining packages outside of the official nixpkgs tree [Marc 8 | Weber's nixpkgs overlay 9 | branch](https://github.com/MarcWeber/nixpkgs/tree/experimental/overlays). 10 | This is optional 11 | 12 | 2\) [A patch for nixpkgs adding special 13 | hooks](https://github.com/MarcWeber/nixpkgs/tree/experimental/ruby). 14 | Required for some ruby packages. 15 | 16 | 3\) [nixpkgs-ruby-overlay](https://gitorious.org/nixpkgs-ruby-overlay). 17 | This contains the gem command "nixpkgsoverlay" which dumps rubyforge 18 | (the ruby package database) into a format nix can read. This also 19 | contais the code interpreting that dump creating derivations (optionally 20 | adding tag files) on the fly. I'm running this command manually once in 21 | a while to update the specs. This repository also merges in information 22 | about C dependencies such as "mysql C library" for ruby's mysql 23 | implementation. 24 | 25 | 4) 26 | [nixpkgs-ruby-overlay-specs](https://gitorious.org/nixpkgs-ruby-overlay-specs) 27 | The dump of ruby forge (40.000 package descriptions), this is quite 28 | large. In the future this information should be fetched from a server. 29 | 30 | [[edit](/w/index.php?title=Nixpkgs-ruby-overlay&action=edit§ion=2 "Edit section: sample usage")] sample usage 31 | ----------------------------------------------------------------------------------------------------------------- 32 | 33 | \~/.nixpkgs/config.nix: 34 | 35 | rubyEnv = 36 | # Access overlay by name 37 | let ro = (pkgs.overlay "ruby"); 38 | # 39 | # From overlay use rubyEnv19 function which 40 | # - reads the gems dumped to the specs repository 41 | # - creates an environment script you can source use like this: "ruby-env-test bash" 42 | # That script extends RUBYLIB and TAG_FILES. 43 | # TAG_FILES can be read in any editor such as Vim. 44 | # 45 | # Latest package versions are preferred. 46 | # Example: names = ["A" "B"], A depending on D, D-2.0 being latest, 47 | # B also depending on D but requiring "1.0", this will fail if A was seen first. 48 | # The fix is to force version 1.0 of D by adding D = "=" "1.0" ; to p. 49 | # Turning a "Gemfile.lock" into an environment is not supported yet. 50 | in ro.rubyEnv19 { 51 | name = "test"; 52 | p = { 53 | # choose version 2.3.9, all gem like comparison operators are supported) 54 | activesupport = "=" "2.3.9" ; 55 | }; 56 | names = [ "activesupport" "rails"]; 57 | }; 58 | -------------------------------------------------------------------------------- /Error Messages.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Error_Messages&action=edit§ion=1 "Edit section: Error Messages")] Error Messages 2 | --------------------------------------------------------------------------------------------------------------- 3 | 4 | If you are stumped by an error message, add it here. 5 | 6 | Error Message 7 | 8 | Occurs When 9 | 10 | Meaning 11 | 12 | Suggested Solution 13 | 14 | Related Links 15 | 16 | `` error: cannot auto-call a function that has an argument without a default value (`stdenv') `` 17 | 18 | Trying to build an individual package with: 19 | `nix-build --dry-run ./default.nix` 20 | 21 | A Nix function was called without a required argument. 22 | 23 | Use `--arg` or `--argstr` to specify arguments. 24 | 25 | [Nix Manual: Common 26 | Options](http://nixos.org/nix/manual/#sec-common-options)\ 27 | [Explanation in email 28 | thread](http://lists.science.uu.nl/pipermail/nix-dev/2009-July/002671.html) 29 | 30 | `/nix/store/*-libtool-2.4.2/bin/libtool: 1581: /nix/store/*-libtool-2.4.2/bin/libtool: preserve_args+= --tag CC: not found` 31 | 32 | Building a package which depends on libtool. 33 | 34 | The `--tag CC` argument is used when libtool is called, but...something. 35 | 36 | Ensure Bash is the shell used. Consider using 37 | `sudo dpkg-reconfigure dash` to fix `/bin/sh`, which "libtool" 38 | references. Nix is heavily dependent on Bash. 39 | 40 | [NAS-Central: Compiling for 41 | Dummies](http://forum.nas-central.org/viewtopic.php?f=249&t=7955#p36385): 42 | See the line before "not found", which uses /bin/sh. 43 | 44 | `Option 'X' defined without option declaration.` 45 | 46 | Using `nixos-rebuild`. 47 | 48 | An option was used in `configuration.nix` which wasn't found in the 49 | NixOS modules. 50 | 51 | Check syntax and validity of all options in `configuration.nix`.\ 52 | If developing a module, ensure it is added to the `module-list.nix` 53 | file. 54 | 55 | [NixOS Modules](//NixOS:Modules) 56 | 57 | `` error: getting attributes of path `X': No such file or directory `` 58 | 59 | Using `nixos-rebuild`. 60 | 61 | Couldn't convert between `types.path` and `types.string`. 62 | 63 | Use the `toString` or `builtins.toPath` functions or change an option's 64 | type. 65 | 66 | [Nix Manual: Built-in 67 | Functions](http://nixos.org/nix/manual/#ssec-builtins)\ 68 | [NixOS Manual: Option 69 | Declarations](http://nixos.org/nixos/manual/#idp772352) 70 | 71 | `` error: opening lock file `/nix/var/nix/profiles/my-profile.lock': Permission denied `` 72 | 73 | Using `nix-env --uninstall` 74 | 75 | The current user does not have write-permission to the `/nix/store` 76 | directory. 77 | 78 | Change ownership of `/nix/store` to the current user. 79 | 80 | `$ chown -R /nix/store /nix/var/nix` 81 | 82 | [Nix Manual: Single-user Mode](http://nixos.org/nix/manual/#idp24312864) 83 | 84 | `` error: getting information about `*/.nix-defexpr`: No such file or directory `` 85 | 86 | Using `nix-env -i $X` 87 | 88 | Nix is looking for the X package. By default, it looks in the user's 89 | `.nix-defexpr` directory. 90 | 91 | Add a NixPkgs channel for the user. 92 | 93 | `$ nix-channel --add http://nixos.org/channels/nixpkgs-unstable && nix-channel --update` 94 | 95 | [Nix Manual: Quick Start](http://nixos.org/nix/manual/#chap-quick-start) 96 | 97 | -------------------------------------------------------------------------------- /How to update when nix is too old to evaluate nixpkgs.page: -------------------------------------------------------------------------------- 1 | The latest version of NixPkgs may use features which are not available 2 | in our version of Nix. The result of this is being unable to install or 3 | reference packages from NixPkgs. For example, the current NixPkgs uses 4 | features of Nix 1.6, but we may only have Nix 1.5. To resolve this 5 | situation, we must acquire a newer version of Nix. 6 | 7 | ### [[edit](/w/index.php?title=How_to_update_when_nix_is_too_old_to_evaluate_nixpkgs&action=edit§ion=1 "Edit section: Upgrading Nix")] Upgrading Nix 8 | 9 | To upgrade Nix, we must obtain the newer version's binaries. There are 10 | two easy ways to do this, both of which fetch the binaries directly from 11 | the Nix project's build server. This method doesn't require evaluating 12 | NixPkgs, so it works great for upgrading the Nix program, itself. 13 | 14 | #### [[edit](/w/index.php?title=How_to_update_when_nix_is_too_old_to_evaluate_nixpkgs&action=edit§ion=2 "Edit section: Installing via Browser")] Installing via Browser 15 | 16 | If we have a browser installed on the target platform, we can open the 17 | [Nix - 18 | Latest](http://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.nix.x86_64-linux/latest-finished) 19 | page, hosted by the Nix project's build server, and click the "One-click 20 | Install" link. This links to a file having a `.nixpkg` file extension, 21 | which should be set up to be handled by the `nix-install-package` 22 | program. Note: Substitute the platform name if your platform is not 23 | x86\_64. 24 | 25 | #### [[edit](/w/index.php?title=How_to_update_when_nix_is_too_old_to_evaluate_nixpkgs&action=edit§ion=3 "Edit section: Installing via Command Line")] Installing via Command Line 26 | 27 | If the platform doesn't have a browser installed, which is a common case 28 | for servers, we can directly use the `nix-install-package` program. 29 | 30 | First, we need to find the URL of the latest binaries. To do that, we 31 | must open the [Nix - 32 | Latest](http://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.nix.x86_64-linux/latest-finished) 33 | page, then copy the URL of the "One-click Install" link. 34 | 35 | Using the URL we just obtained, paste it into the following command to 36 | install the latest version of the Nix program directly from the Nix 37 | project's build server. 38 | 39 | $ nix-install-package --non-interactive --url $NIX_LATEST_URL 40 | 41 | ##### [[edit](/w/index.php?title=How_to_update_when_nix_is_too_old_to_evaluate_nixpkgs&action=edit§ion=4 "Edit section: Trusted Binary Caches")] Trusted Binary Caches 42 | 43 | The recommended method for upgrading Nix is by using the 44 | `nix-install-package` program. This program uses the "nix.conf" file to 45 | verify that the URL is included in the "trusted\_binary\_caches". 46 | Running `nix-install-package` as root is not constrained in this manner, 47 | but it will only install the specified package for the root user, rather 48 | than for our normal user account. 49 | 50 | Therefore, if our installation is rejected due to being hosted by an 51 | untrusted host, we must add the hostname to the "nix.conf" file. For 52 | NixOS useres, add the hostname to the `nix.trustedBinaryCaches` 53 | configuration option and rebuild the machine. For users of other OSs, 54 | manually edit the "nix.conf" file, usually found in the `/etc/nix/` 55 | directory. 56 | 57 | -------------------------------------------------------------------------------- /NFS.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=NFS&action=edit§ion=1 "Edit section: Server")] Server 2 | ------------------------------------------------------------------------------------ 3 | 4 | The setup is very similar as it would be done in regular config file. I 5 | will use my setup as an example. 6 | 7 | I wish to share 4 mount-points (/mnt/kotomi, /mnt/mafuyu, /mnt/sen, 8 | /mnt/tomoyo) with my other computers which will run NFS clients. 9 | 10 | First I created a separate directory for NFS shares: 11 | 12 | mkdir /export 13 | 14 | Then I mount (bind) the locations inside of /export from my config. 15 | Normally one would put it in /etc/fstab but nix generates that for us: 16 | 17 | fileSystems."/export/mafuyu" = { 18 | device = "/mnt/mafuyu"; 19 | options = "bind"; 20 | }; 21 | 22 | fileSystems."/export/sen" = { 23 | device = "/mnt/sen"; 24 | options = "bind"; 25 | }; 26 | 27 | fileSystems."/export/tomoyo" = { 28 | device = "/mnt/tomoyo"; 29 | options = "bind"; 30 | }; 31 | 32 | fileSystems."/export/kotomi" = { 33 | device = "/mnt/kotomi"; 34 | options = "bind"; 35 | }; 36 | 37 | Next we have to tell nix how we want to export these and to whom: 38 | 39 | services.nfs.server.enable = true; 40 | services.nfs.server.exports = '' 41 | /export 192.168.1.10(rw,fsid=0,no_subtree_check) 192.168.1.15(rw,fsid=0,no_subtree_check) 42 | /export/kotomi 192.168.1.10(rw,nohide,insecure,no_subtree_check) 192.168.1.15(rw,nohide,insecure,no_subtree_check) 43 | /export/mafuyu 192.168.1.10(rw,nohide,insecure,no_subtree_check) 192.168.1.15(rw,nohide,insecure,no_subtree_check) 44 | /export/sen 192.168.1.10(rw,nohide,insecure,no_subtree_check) 192.168.1.15(rw,nohide,insecure,no_subtree_check) 45 | /export/tomoyo 192.168.1.10(rw,nohide,insecure,no_subtree_check) 192.168.1.15(rw,nohide,insecure,no_subtree_check) 46 | ''; 47 | 48 | Here I export all my bound shares to 2 local IPs. For various flags, you 49 | can check the [Gentoo wiki NFSv4 50 | article](https://wiki.gentoo.org/wiki/NFSv4#Server) which has a nice 51 | coverage. 52 | 53 | Remember that you can always use 54 | 55 | nixos-option 56 | 57 | to check what's available. 58 | 59 | [shana@lenalee:~]$ nixos-option services.nfs.server 60 | This attribute set contains: 61 | createMountPoints 62 | enable 63 | exports 64 | hostName 65 | nproc 66 | 67 | Please remember that NixOS by default has a firewall turned on! Add 68 | rules to allow NFS traffic or switch it off if you don't need it. 69 | 70 | [[edit](/w/index.php?title=NFS&action=edit§ion=2 "Edit section: Client")] Client 71 | ------------------------------------------------------------------------------------ 72 | 73 | Setting up the client is very easy. To follow from the server example, 74 | say I want to mount the now exposed *tomoyo* share on another box, call 75 | it *server*, to */mnt/tomoyo*. 76 | 77 | All I have to do is to put 78 | 79 | fileSystems."/mnt/tomoyo" = { 80 | device = "server:/tomoyo"; 81 | fsType = "nfs"; 82 | }; 83 | 84 | Note that clients see the exposed shares as if they were exposed at the 85 | root level: */export/foo* becomes */foo* when client is concerned with 86 | mounting it. Regular **fileSystems** options apply. 87 | 88 | -------------------------------------------------------------------------------- /Terms and Definitions in Nix Project.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Terms_and_Definitions_in_Nix_Project&action=edit§ion=1 "Edit section: Terms and Definitions")] Terms and Definitions 2 | --------------------------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | If you come across a term or word you don't know, add it here. 5 | 6 | Term 7 | 8 | Context 9 | 10 | Meaning 11 | 12 | Related Links 13 | 14 | `rec { }` 15 | 16 | Nix expressions 17 | 18 | The `{ }` block contains "mutually recursive" attributes, which means 19 | they can refer to each other. 20 | 21 | [Composing the Hello 22 | Package](http://nixos.org/nix/manual/#ex-hello-composition) 23 | 24 | `expression evaluator` 25 | 26 | Nix 27 | 28 | The part of the Nix program which reads and evaluates a Nix expression. 29 | 30 | [Nix Manual: Common 31 | Options](http://nixos.org/nix/manual/#sec-common-options) `--arg`\ 32 | [Nix Manual: Built-in 33 | Functions](http://nixos.org/nix/manual/#ssec-builtins) 34 | 35 | Derivation 36 | 37 | Nix 38 | 39 | A Nix expression which describes a build action. When evaluated, it 40 | creates one or more entries in the Nix Store. The `nix-instantiate` 41 | command is the command which creates entries in the Nix Store, while the 42 | `nix-env` and `nix-build` commands are its user-friendly interface. 43 | 44 | [Nix Manual: Glossary -\> 45 | Derivation](http://nixos.org/nix/manual/#gloss-derivation)\ 46 | [Nix Manual: Derivation](http://nixos.org/nix/manual/#ssec-derivation) 47 | 48 | `stdenv` 49 | 50 | Nix expressions 51 | 52 | An attribute which contains things expected in the most basic Unix 53 | environment. (e.g. Bash shell, `gcc`, `cp`, `tar`, `grep`, etc.) 54 | 55 | [all-packages.nix: 56 | `stdenv =`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix#L224)] 57 | 58 | User Environment 59 | 60 | Nix 61 | 62 | A set of "active" applications. These applications often exist in the 63 | Nix store. A single Nix user may have multiple User Environments. 64 | 65 | [Nix Manual: Glossary](http://nixos.org/nix/manual/#idp26825824) 66 | 67 | User Profile 68 | 69 | Nix 70 | 71 | A user's currently selected User Environment. 72 | 73 | [Nix Manual: Glossary](http://nixos.org/nix/manual/#idp26825824) 74 | 75 | Generation 76 | 77 | Nix 78 | 79 | A past revision of a user's environment. This term connotes the cloning 80 | and modification of an existing user environment. Nix's environment 81 | rollback facilities rely on Generations. 82 | 83 | [Nix Manual: Profiles](http://nixos.org/nix/manual/#sec-profiles) 84 | 85 | `config.nix` or `nixpkgs-config.nix` 86 | 87 | NixOS Wiki 88 | 89 | A Nix expression retrieved by and applied to the `all-packages.nix` Nix 90 | expression. This file enables an end-user to customize the Nix 91 | expressions contained in the community-owned NixPkgs list or to define 92 | entirely new Nix expressions to use with Nix commands. This file's path 93 | can be overridden by the `NIXPKGS_CONFIG` environment variable. 94 | 95 | [all-packages.nix: 96 | `config`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix#L54) 97 | 98 | [NixPkgs Release 99 | Notes](https://github.com/NixOS/nixpkgs/blob/master/doc/release-notes.xml#L366) 100 | 101 | -------------------------------------------------------------------------------- /Distributed build.page: -------------------------------------------------------------------------------- 1 | Sometimes you want to use a faster machine for building a nix derivation 2 | you want to use on a slower one. If both of them run NixOS you can 3 | follow this little HOWTO to make it happen. 4 | 5 | --- ignore this, look at nix.buildMachines in [NixOS 6 | Manual](http://hydra.nixos.org/job/nixos/trunk/manual/latest/download) 7 | --- 8 | 9 | [[edit](/w/index.php?title=Distributed_build&action=edit§ion=1 "Edit section: Prerequisites")] Prerequisites 10 | ---------------------------------------------------------------------------------------------------------------- 11 | 12 | You'll need to setup public key based login from the slower machine to 13 | root account on the one that'll do the actual building, and this article 14 | won't cover setting this up (there are many that do, so you shouldn't 15 | have any problem googling this). 16 | 17 | [[edit](/w/index.php?title=Distributed_build&action=edit§ion=2 "Edit section: Preparing")] Preparing 18 | -------------------------------------------------------------------------------------------------------- 19 | 20 | First you have to prepare the remote-systems.conf file on the slower 21 | machine, for example in /etc/nixos/remote-systems.conf, with contents 22 | similar to: 23 | 24 | root@builder.example.com i686-linux /etc/nixos/id_rsa 4 25 | 26 | Where: 27 | 28 | 1\. root@builder.example.com is and addres of the machine that'll do the 29 | build. If you want to use port other than 22, you have to set up an 30 | alias in /root/.ssh/config 31 | 32 | 2\. i686-linux is a platform of that machine 33 | 34 | 3\. /etc/nixos/id\_rsa is a path to the private part of a key used to log 35 | in to the builder 36 | 37 | 4\. 4 is a number of jobs that should be run in parallel on that machine 38 | 39 | As a convenience, we'll make a little script. Put this into 40 | /etc/nixos/remote-build-env: 41 | 42 | mkdir /tmp/build-remote-load/ 43 | chmod a+rwX /tmp/build-remote-load/ 44 | 45 | # First find our build hook script 46 | STORE_PATH_FOR_NIX=$(ls -l `which nix-env` | awk '{ sub( /bin\/nix-env/, "", $NF ); print $NF }') 47 | BUILD_REMOTE=`find "${STORE_PATH_FOR_NIX}" -name build-remote.pl` 48 | 49 | # now set up environment for nix-worker 50 | export NIX_BUILD_HOOK="${BUILD_REMOTE}" 51 | export NIX_REMOTE_SYSTEMS="/etc/nixos/remote-systems.conf" 52 | export NIX_CURRENT_LOAD="/tmp/build-remote-load" 53 | 54 | [[edit](/w/index.php?title=Distributed_build&action=edit§ion=3 "Edit section: Running the build")] Running the build 55 | ------------------------------------------------------------------------------------------------------------------------ 56 | 57 | This is the part that you'll have to do every time you want to build 58 | something remotely. First, as root: 59 | 60 | stop nix-daemon 61 | . /etc/nixos/remote-build-env 62 | nix-worker --daemon & 63 | 64 | Then, as a user you want to do the build as: 65 | 66 | . /etc/nixos/remote-build-env 67 | 68 | after that you can run nix-env normally, and the work should be 69 | distributed among machines in your remote-systems.conf 70 | 71 | [[edit](/w/index.php?title=Distributed_build&action=edit§ion=4 "Edit section: using remote builds on NixOS")] using remote builds on NixOS 72 | ---------------------------------------------------------------------------------------------------------------------------------------------- 73 | 74 | See configuration options nix.distributedBuilds, nix.manualNixMachines, 75 | etc to set this up in your /etc/configuration.nix file 76 | 77 | -------------------------------------------------------------------------------- /Anatomy of Nix Package Management.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Anatomy_of_Nix_Package_Management&action=edit§ion=1 "Edit section: Introduction")] Introduction 2 | ------------------------------------------------------------------------------------------------------------------------------ 3 | 4 | Package management using Nix involves two major collections of objects: 5 | 6 | 1. Nix expressions 7 | 2. Items in the Nix store. 8 | 9 | Processing Nix expressions causes *derivations* and *assets* to be 10 | present in the Nix store. Building a derivation causes a *build* to be 11 | present in the Nix store. Items are removed from the Nix store when they 12 | are no longer deemed to be necessary. On individual, end-users' 13 | computers, items are no longer necessary if they are no longer needed by 14 | any of the installed software. On repositories from which end users may 15 | download precompiled artifacts, items are no longer necessary if they 16 | are no longer needed by any "supported builds". 17 | 18 | The Nix store usually contains artifacts which have accumulated over 19 | time. It may contain more than one version of any particular software 20 | package. It may contain more than one variant of a software package. 21 | 22 | A "release channel" represents a snapshot of a set of packages at an 23 | instant in time. It pairs a set of nix expressions with a set of Nix 24 | store artifacts identified in a manifest. The Nix store artifacts 25 | represent what is necessary to build a supported set of packages, in 26 | addition to the final built artifacts. 27 | 28 | [[edit](/w/index.php?title=Anatomy_of_Nix_Package_Management&action=edit§ion=2 "Edit section: Package Identification")] Package Identification 29 | -------------------------------------------------------------------------------------------------------------------------------------------------- 30 | 31 | As shown below, software packages are identified by different means 32 | within different namespaces. Early in the process, nix expressions 33 | represent a software package. Nix expressions are identified in two 34 | different namespaces. They have a human-readable name, which must be 35 | unique within the collection of packages. The human readable name may be 36 | used to specify which packages to install or remove, and typically 37 | includes an indication of the package version. Nix expressions are also 38 | identified by an attribute name, which is specified when the package is 39 | *composed* into a set. This is used when one nix expression needs to 40 | specify a dependency on another (such as on `fetchurl`.) Both namespaces 41 | are "flat". 42 | 43 | [![NixDependencies.png](/w/images/7/75/NixDependencies.png)](//File:NixDependencies.png) 44 | 45 | As Nix expressions are processed, artifacts are introduced to the Nix 46 | store. Items in the Nix store are identified by a third namespace. In 47 | contrast to the to the very non-specific names typically specified in 48 | Nix expressions, and the generic identifiers used when Nix expressions 49 | are composed, the highly structured identifiers used in the Nix store 50 | capture detailed information about the contents (and dependencies) of 51 | each item. 52 | 53 | As shown above, a single Nix expression can produce many derivations 54 | where different variants or versions are selected. Derivations typically 55 | produce only one build. However, it may soon be possible for a 56 | derivation to produce multiple builds in order to split large packages 57 | into smaller pieces. Subsequent builds may then depend on those portions 58 | of the package they require, rather than the whole thing. 59 | 60 | -------------------------------------------------------------------------------- /Installing NixOS in a VirtualBox guest.page: -------------------------------------------------------------------------------- 1 | This pages describes how to install NixOS in a VirtualBox guest. 2 | 3 | - Download a NixOS ISO from 4 | - Add a New Machine in VirtualBox with OS Type "Linux / Other Linux" 5 | - Base Memory Size: 768 MB 6 | - New Hard Disk of 8 GB 7 | - Mount the CD-ROM with the NixOS ISO (by clicking on CD/DVD-ROM) 8 | - Click on Settings / Advanced (or possibly System / Processor) and 9 | enable PAE/NX 10 | - Click on Settings / Advanced (or possibly System / Acceleration) and 11 | enable "VT-x/AMD-V" acceleration 12 | - Networking: select "Attached to: NAT". Change host-interface to 13 | "en1: Airport". 14 | - Now you can install NixOS: 15 | 16 | 17 | 18 | $ fdisk /dev/sda (create a full partition, don't skip this step, example commands for quick setup: n,p,1,w) 19 | $ mkfs.ext4 -j -L nixos /dev/sda1 (idem) 20 | $ mount LABEL=nixos /mnt 21 | $ nixos-generate-config --root /mnt (for quick setup overwrite configuration.nix completely with example below) 22 | $ nano /mnt/etc/nixos/configuration.nix 23 | 24 | (add the fileSystems. this is what my final config looks like:) 25 | 26 | { config, pkgs, ...} : 27 | { 28 | boot.loader.grub.device = "/dev/sda"; 29 | 30 | services.openssh.enable = true; 31 | services.virtualbox.enable = true; 32 | 33 | fileSystems = [ 34 | { mountPoint = "/"; 35 | label = "nixos"; 36 | } 37 | ]; 38 | } 39 | 40 | Now we're ready to install! 41 | 42 | $ nixos-install 43 | $ reboot 44 | 45 | Now you got a working nixos system. 46 | 47 | [[edit](/w/index.php?title=Installing_NixOS_in_a_VirtualBox_guest&action=edit§ion=1 "Edit section: SSH-ing into the box")] SSH-ing into the box 48 | --------------------------------------------------------------------------------------------------------------------------------------------------- 49 | 50 | However, you can't conveniently log in to ssh this way, so you'll need 51 | to set up port-forwarding. Doing that is explained on this site, all you 52 | have to do is create a script named "vbox-tunnel" that contains the 53 | following lines: 54 | 55 | #!/bin/bash 56 | cd /Applications/VirtualBox.app/Contents/MacOS/ 57 | ./VBoxManage setextradata "$1" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$2/Protocol" TCP 58 | ./VBoxManage setextradata "$1" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$2/GuestPort" $3 59 | ./VBoxManage setextradata "$1" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/$2/HostPort" $4 60 | 61 | Now execute the script: 62 | 63 | vbox-tunnel Nix sshtunnel 22 2222 64 | 65 | You should be able to log in to Nix now by running 66 | `ssh -p2222 localhost` in your OS X Terminal. Enjoy! 67 | 68 | Alternative (independent of virtual network card chosen for the guest): 69 | 70 | VBoxManage modifyvm "Nix" --natpf1 "sshtunnel,tcp,,2222,,22" 71 | 72 | As before, you are now able to log in to Nix by running 73 | `ssh -p2222 localhost` in your terminal. 74 | 75 | [[edit](/w/index.php?title=Installing_NixOS_in_a_VirtualBox_guest&action=edit§ion=2 "Edit section: Vagrant boxes")] Vagrant boxes 76 | ------------------------------------------------------------------------------------------------------------------------------------- 77 | 78 | Alternatively you can also use packer to generate vagrant boxes. Both 79 | packer and vagrant aren't available in the nixpkgs repo yet but it can 80 | be a good way to test out NixOS on another OS. 81 | 82 | The build instructions and code are available there: 83 | 84 | 85 | -------------------------------------------------------------------------------- /Airis N990.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Airis_N990&action=edit§ion=1 "Edit section: Overview")] Overview 2 | =============================================================================================== 3 | 4 | - Processor: AMD Sempron 2600, 1600MHz, only 32-bit. 5 | - HD: IDE 2,5" 6 | - Screen: 1024x768 7 | 8 | Manufacturer Website: [Airis](http://www.airis.es) 9 | 10 | [[edit](/w/index.php?title=Airis_N990&action=edit§ion=2 "Edit section: Configuration")] Configuration 11 | ========================================================================================================= 12 | 13 | Minimal configuration: 14 | 15 | boot = { 16 | initrd.kernelModules = [ 17 | "pata_via" 18 | ]; 19 | kernelModules = [ 20 | "powersave" 21 | "cpufreq_ondemand" 22 | "cpufreq_userspace" 23 | "cpufreq_powersave" 24 | "powernow-k8" 25 | ]; 26 | kernelParams = [ 27 | "selinux=0" 28 | "apm=on" 29 | "acpi=on" 30 | "vga=0x317" # 1024x768 31 | "console=tty1" 32 | "video=vesafb:ywrap" # Faster scroll 33 | ]; 34 | }; 35 | services.xserver = { 36 | videoDriver = "unichrome"; 37 | synaptics = { 38 | enable = true; 39 | dev = "/dev/input/event7"; # On linux 2.6.31 40 | }; 41 | }; 42 | # Wifi card 43 | networking.enableIntel2200BGFirmware = true; 44 | 45 | [[edit](/w/index.php?title=Airis_N990&action=edit§ion=3 "Edit section: lspci")] lspci 46 | ========================================================================================= 47 | 48 | 00:00.0 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge 49 | 00:00.1 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge 50 | 00:00.2 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge 51 | 00:00.3 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge 52 | 00:00.4 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge 53 | 00:00.7 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge 54 | 00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800/K8T890 South] 55 | 00:09.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller (rev 01) 56 | 00:0a.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05) 57 | 00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80) 58 | 00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80) 59 | 00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80) 60 | 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) 61 | 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge 62 | 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) 63 | 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50) 64 | 00:11.6 Communication controller: VIA Technologies, Inc. AC'97 Modem Controller (rev 80) 65 | 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) 66 | 00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration 67 | 00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map 68 | 00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller 69 | 00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control 70 | 01:00.0 VGA compatible controller: VIA Technologies, Inc. K8M800/K8N800/K8N800A [S3 UniChrome Pro] (rev 01) 71 | -------------------------------------------------------------------------------- /How to watch digital TV (DVB-T).page: -------------------------------------------------------------------------------- 1 | I wanted to use my digital TV tuner in form of a USB stick on my NixOS 2 | system. Some of the steps I had to go through: 3 | 4 | ### [[edit](/w/index.php?title=How_to_watch_digital_TV_(DVB-T)&action=edit§ion=1 "Edit section: Find the hardware")] Find the hardware 5 | 6 | $ lsusb 7 | [..] 8 | Bus 002 Device 003: ID 2040:7060 Hauppauge Nova-T Stick 2 9 | 10 | However, dmesg says: 11 | 12 | $ dmesg 13 | [..] 14 | [54625.430024] usb 2-2: new high speed USB device using ehci_hcd and address 6 15 | [54625.545573] usb 2-2: New USB device found, idVendor=2040, idProduct=7060 16 | [54625.545577] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 17 | [54625.545579] usb 2-2: Product: Nova-T Stick 18 | [54625.545581] usb 2-2: Manufacturer: Hauppauge 19 | [54625.545583] usb 2-2: SerialNumber: 4028664348 20 | [54625.546073] dvb-usb: found a 'Hauppauge Nova-T Stick' in cold state, will try to load a firmware 21 | [54625.562868] dvb-usb: did not find the firmware file. (dvb-usb-dib0700-1.20.fw) Please see linux/Documentation/dvb/ for more details on firmware-problems. (-2) 22 | ^^^^^^^^^^^^^^^^^^^^^^^ 23 | 24 | ### [[edit](/w/index.php?title=How_to_watch_digital_TV_(DVB-T)&action=edit§ion=2 "Edit section: Install the firmware driver")] Install the firmware driver 25 | 26 | Find your firmware driver, mentioned in the dmeg output above, here: 27 | 28 | 29 | In your configuration.nix, add: 30 | 31 | hardware.firmware = [ "/firmware" ]; 32 | 33 | next as root: 34 | 35 | $ mkdir /firmware 36 | $ cd /firmware 37 | $ wget http://linuxtv.org/downloads/firmware/dvb-usb-dib0700-1.20.fw 38 | 39 | and 40 | 41 | $ nixos-rebuild switch 42 | 43 | then replug the USB stick and: 44 | 45 | $ dmesg 46 | [..] 47 | [49344.478059] dvb-usb: found a 'Hauppauge Nova-T Stick' in cold state, will try to load a firmware 48 | [49344.539358] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw' 49 | [49345.336764] dib0700: firmware started successfully. 50 | [..] 51 | $ ls /dev/dvb 52 | adapter0 53 | 54 | good :-) 55 | 56 | ### [[edit](/w/index.php?title=How_to_watch_digital_TV_(DVB-T)&action=edit§ion=3 "Edit section: Find the channels")] Find the channels 57 | 58 | Install the dvb-apps: 59 | 60 | $ nix-env -i dvb-apps 61 | 62 | and use the scan tool, from the dvb-apps package, like this: 63 | 64 | $ scan /nix/store/j6akfv58g5077pb4h275l8rrmsnrdwz3-dvb-apps-7f68f9c8d311/share/dvb/dvb-t/de-Berlin > ~/my_channels.conf 65 | 66 | scanning [..] 67 | using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' 68 | initial transponder 506000000 0 2 9 1 1 2 0 69 | [..] 70 | >>> tune to: 506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE 71 | WARNING: filter timeout pid 0x0011 72 | WARNING: filter timeout pid 0x0000 73 | WARNING: filter timeout pid 0x0010 74 | [..] 75 | 0x0000 0x000b: pmt_pid 0x044c ARD -- rbb Brandenburg (running) 76 | 0x0000 0x000c: pmt_pid 0x04b0 ARD -- rbb Berlin (running) 77 | 0x0000 0x000d: pmt_pid 0x0514 ARD -- Phoenix (running) 78 | 0x0000 0x000e: pmt_pid 0x0578 ARD -- Das Erste (running) 79 | 0x0000 0x000f: pmt_pid 0x05dc ARD -- EinsExtra (running) 80 | [..] 81 | 82 | Note: there are other scan locations to pick from to be found under your 83 | /nix/store/..-dvb-apps-version/share/dvb/dvb-t/.. 84 | 85 | ### [[edit](/w/index.php?title=How_to_watch_digital_TV_(DVB-T)&action=edit§ion=4 "Edit section: Finally watch")] Finally watch 86 | 87 | $ nix-env -i vlc 88 | $ vlc ~/my_channels.conf 89 | -------------------------------------------------------------------------------- /Nix Wiki.page: -------------------------------------------------------------------------------- 1 | A wiki is a low-barrier way to build a database of eventually consistent 2 | and correct info. Good topics includes history, design, and purpose of 3 | Nix, as well as relationships with non-Nix topics. 4 | 5 | A wiki is a scratch-pad owned by the community. If it's missing 6 | something, add it somewhere. People monitor changes to the wiki and will 7 | eventually modify the additions to fit the design of the rest of the 8 | wiki. 9 | 10 | [[edit](/w/index.php?title=Nix_Wiki&action=edit§ion=1 "Edit section: Topics")] Topics 11 | ========================================================================================= 12 | 13 | The Nix project consists of efforts which span several areas, so we 14 | visually organize the wiki around them. These areas include 15 | 16 | - OS-management 17 | - Software building & Distribution 18 | - Development environments 19 | 20 | Contrary to what the Nix project's domain name may suggest, NixOS is 21 | only one component of the Nix project. This wiki is not only for 22 | NixOS-related topics, nor is it only for developers to add sparse 23 | documentation and notes, though both are welcome. Rather, the Nix wiki 24 | should be a place for ideas, which include describing the big picture 25 | and explaining details. 26 | 27 | [[edit](/w/index.php?title=Nix_Wiki&action=edit§ion=2 "Edit section: Writing Style")] Writing Style 28 | ======================================================================================================= 29 | 30 | If you care about Writing style, here is a quick list: 31 | 32 | - First-person 33 | - (Research and add more) 34 | 35 | The [UDX Initiative](//UDX Initiative) page has explanations of the 36 | guidelines we try to follow. 37 | 38 | [[edit](/w/index.php?title=Nix_Wiki&action=edit§ion=3 "Edit section: Terms")] Terms 39 | --------------------------------------------------------------------------------------- 40 | 41 | Using terms consistently helps readers make correct connections between 42 | topics. When deciding between multiple, technically correct terms to 43 | use, prefer the ones in this list. Also, consistent casing is as 44 | important as consistent terms. 45 | 46 | - (Add terms here) 47 | 48 | [[edit](/w/index.php?title=Nix_Wiki&action=edit§ion=4 "Edit section: Wiki Software")] Wiki Software 49 | ======================================================================================================= 50 | 51 | from the wiki's purpose of a \*central\* place for community-maintained 52 | big-picture info. 53 | 54 | As mentioned above, a wiki's purpose is to be a central place for 55 | community-maintained, big-picture info, with a low barrier for receiving 56 | contributions. What kind of software can we use to manage this? Here's a 57 | list of features which enables this kind of information compilation. 58 | 59 | Requirements: 60 | 61 | 1. Easy for anyone to contribute 62 | 2. Searchable 63 | 3. Content history, to recover lost info 64 | 65 | Nice to have: 66 | 67 | 1. Organizable into topics 68 | 2. Easy to maintain software 69 | 3. Portable storage format 70 | 71 | Currently, we use MediaWiki software to edit, style, store, and serve 72 | the content, and it works pretty well. We are, of course, willing to 73 | discuss alternatives. 74 | 75 | [[edit](/w/index.php?title=Nix_Wiki&action=edit§ion=5 "Edit section: Other")] Other 76 | ======================================================================================= 77 | 78 | For now, our wiki guidelines will fall-back to those described on the 79 | [Arch wiki 80 | help](https://wiki.archlinux.org/index.php/ArchWiki:Contributing) page, 81 | as they seem to have experience. 82 | 83 | [jacobian.org](http://jacobian.org/writing/great-documentation/) is 84 | another page. It has very good suggestions for documentation. 85 | 86 | -------------------------------------------------------------------------------- /NixOps:Deploying From Non-Linux OS.page: -------------------------------------------------------------------------------- 1 | This page was copy-pasted from [this blog 2 | post](http://functional-orbitz.blogspot.com/2013/05/setting-up-nixops-on-mac-os-x-with.html), 3 | but needs lots of clean-up. Please add clarification and organization if 4 | you can. 5 | 6 | When deploying an instance, NixOps needs to build the environment before 7 | transferring it to target host. This requires an existing NixOS instance 8 | on which to build. If you use a NixOS machine for development, the same 9 | machine is normally used for this purpose. If you use a different 10 | machine, you must setup a Linux OS somewhere else, then configure NixOps 11 | to use it when deploying. One way to accomplish this is by creating a 12 | NixOS instance in a VM. Eventually, NixOps may do this for you, but for 13 | now we must do this manually. Installing NixOS on VirtualBox is pretty 14 | simple, so it is the recommended solution in this case. After having a 15 | NixOS instance ready, we must set up remote access for NixOps to use 16 | when using the machine for deployments. Here is a guide for setting up 17 | this remote access. 18 | 19 | ### [[edit](/w/index.php?title=NixOps:Deploying_From_Non-Linux_OS&action=edit§ion=1 "Edit section: NixOps: Deploying from a Non-Linux OS")] NixOps: Deploying from a Non-Linux OS 20 | 21 | - Install a NixOS on VirtualBox. The [Installing NixOS in a VirtualBox 22 | guess](//Installing NixOS in a VirtualBox guest) wiki page is a good 23 | resource. This doesn't need any special settings, just SSH. 24 | 25 | - Setup a port forward so you can SSH into the machine. I'll assume 26 | this port forward is 3223. 27 | 28 | - Make a user called 'nix' on the VM. This is the user that we will 29 | SSH through for building. The name of the user doesn't matter, but 30 | these directions will assume its name is 'nix'. On your development 31 | machine, create two pairs of passwordless SSH keys. One pair will be 32 | the login for the 'nix' user. The other will be signing keys. 33 | Install the login public key on the VM. 34 | 35 | - On your development machine, run this command: \`mkdir /etc/nix/\`, 36 | then copy the private signing key to \`/etc/nix/signing-key.sec\`. 37 | Make sure this is owned by the user you'll be running nixops as and 38 | is readable only by that user. 39 | 40 | - Create a public signing key from your private signing key using 41 | openssl. This needs to be in whatever format openssl produces which 42 | is not the same as what ssh-keygen created. This output should be in 43 | \`/etc/nix/signing-key.pub\`. The owner and permissions don't matter 44 | as long as the user you'll run nixops as can read it. 45 | 46 | 47 | 48 | openssl rsa -in /etc/nix/signing-key.sec -pubout > /etc/nix/signing-key.pub 49 | 50 | - Copy the signing keys to the build server, putting them in the same 51 | location. Make sure the nix user owns the private key and is the 52 | only one that can read it. 53 | 54 | - Tell nix to do distributed builds: 55 | 56 | 57 | 58 | export NIX_BUILD_HOOK=$HOME/.nix-profile/libexec/nix/build-remote.pl 59 | 60 | - Tell the distributed builder where to store load content: 61 | 62 | 63 | 64 | export NIX_CURRENT_LOAD=/tmp/current-load 65 | mkdir /tmp/current-load 66 | 67 | - Go into a directory you can create files in: 68 | 69 | 70 | 71 | cat < remote-systems.conf 72 | nix@nix-build-server x86_64-linux /Users/`whoami`/.ssh/id_rsa 1 1 73 | EOF 74 | 75 | - Tell the remote builder where to find machine information: 76 | 77 | 78 | 79 | export NIX_REMOTE_SYSTEMS=$PWD/remote-systems.conf 80 | 81 | - Add an entry to \`\~/.ssh/config\` the fake host 'nix-build-server' 82 | turns into your actual VM: 83 | 84 | 85 | 86 | Host nix-build-server 87 | HostName localhost 88 | Port 3223 89 | -------------------------------------------------------------------------------- /Installing hydra as nixos module.page: -------------------------------------------------------------------------------- 1 | In order to install the Hydra buildserver in Nixos as a nixos module 2 | alongside for instance sshd and other system daemons you need to: 3 | 4 | - Get the hydra sources from github: 5 | . Put them in a suitable place, for example '/root/hydra'. 6 | - Include the hydra module in the nixos system composition 7 | /etc/nixos/configuration.nix 8 | 9 | [[edit](/w/index.php?title=Installing_hydra_as_nixos_module&action=edit§ion=1 "Edit section: /etc/nixos/configuration.nix")] /etc/nixos/configuration.nix 10 | ------------------------------------------------------------------------------------------------------------------------------------------------------------- 11 | 12 | Add the con hydra-module.nix to the require list, and configure it: 13 | 14 | { config, pkgs, ... }: 15 | 16 | { 17 | 18 | require = [ 19 | 20 | /root/hydra/hydra-module.nix 21 | 22 | ]; 23 | 24 | \# Hydra: 25 | 26 | services.hydra = { 27 | 28 | enable = true; 29 | 30 | hydra = (import /root/hydra/release.nix {}).build.x86\_64-linux; \# or 31 | i686-linux if appropriate. 32 | 33 | hydraURL = "\:3000"; 34 | 35 | notificationSender = "hydra@my-buildserver.domain"; 36 | 37 | }; 38 | 39 | \# Hydra requires postgresql to run 40 | 41 | services.postgresql.enable = true; 42 | 43 | services.postgresql.package = pkgs.postgresql; 44 | 45 | } 46 | 47 | [[edit](/w/index.php?title=Installing_hydra_as_nixos_module&action=edit§ion=2 "Edit section: Letting nix handle the git repository")] Letting nix handle the git repository 48 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 49 | 50 | Alternatively, you can reference the hydra repository directly from 51 | /etc/nixos/configuration.nix: 52 | 53 | { config, pkgs, ... }: 54 | 55 | let hydra = pkgs.fetchgit { url = ; rev 56 | = "refs/heads/master"; }; 57 | 58 | in { 59 | 60 | require = [ ... "\${hydra}/hydra-module.nix" ]; 61 | 62 | ... 63 | 64 | \# Hydra: 65 | 66 | services.hydra = { 67 | 68 | enable = true; 69 | 70 | hydra = (import "\${hydra}/release.nix" {}).build.x86\_64-linux; \# or 71 | i686-linux if appropriate. 72 | 73 | hydraURL = "\:3000"; 74 | 75 | notificationSender = "hydra@my-buildserver.domain"; 76 | 77 | }; 78 | 79 | \# Hydra requires postgresql to run 80 | 81 | services.postgresql.enable = true; 82 | 83 | services.postgresql.package = pkgs.postgresql; 84 | 85 | } 86 | 87 | This will include the hydra repository in the nix store. The repository 88 | will be kept there until garbage collected, at which time 89 | nixos-rebuilding will refetch the (possibly updated) repository. 90 | 91 | [[edit](/w/index.php?title=Installing_hydra_as_nixos_module&action=edit§ion=3 "Edit section: Building the configuration")] Building the configuration 92 | --------------------------------------------------------------------------------------------------------------------------------------------------------- 93 | 94 | Then, running 'nixos-rebuild switch' and rebooting, hydra initialises 95 | itself through systemd scripts, enabled as part of the installation. 96 | 97 | Now you should be ready to log in to hydra. The password for user 98 | 'admin' is generated at initialisation time, and found in 99 | '/var/lib/hydra/.pgpass', which incidentally is also the password used 100 | by hydra to connect to postgresql. 101 | 102 | The contents are: 103 | 104 | localhost:\*:hydra:hydra:\ 105 | 106 | Now, refer to the [Hydra](//Hydra) 107 | [manual](http://hydra.nixos.org/job/hydra/trunk/tarball/latest/download-by-type/doc-pdf/manual) 108 | for more info 109 | 110 | -------------------------------------------------------------------------------- /Nix Installing Packages.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Nix_Installing_Packages&action=edit§ion=1 "Edit section: How to install a software package using Nix?")] How to install a software package using Nix? 2 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 3 | 4 | The easiest way to get Nix expressions is to use the community's NixPkgs 5 | repository. After setting it up, use the `nix-env` command to install 6 | the packages defined there. 7 | 8 | $ nix-channel --add http://nixos.org/channels/nixpkgs-unstable 9 | $ nix-channel --update 10 | $ nix-env --install hello 11 | 12 | The [`nix-channel`](http://nixos.org/nix/manual/#sec-nix-channel) 13 | command registers URL which has a Nix expression. Then, we use 14 | `nix-channel --update` to download this Nix expression. Finally, we use 15 | the `nix-env --install` command to install the "hello" package. The 16 | [`nix-env`](http://nixos.org/nix/manual/#sec-nix-env) command installs 17 | or removes software in our environment. 18 | 19 | [[edit](/w/index.php?title=Nix_Installing_Packages&action=edit§ion=2 "Edit section: How to query available software packages?")] How to query available software packages? 20 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 21 | 22 | Besides the "hello" package, what else can we install? We can use the 23 | `nix-env --query --available` command on the command line, or its 24 | aliases. 25 | 26 | $ nix-env --query --available firefox 27 | $ nix-env --query --available 28 | $ nix-env --query --available | grep firefox 29 | $ nix-env -q -a | grep firefox 30 | $ nix-env -qa | grep firefox 31 | 32 | We can also see which packages we currently have installed by using the 33 | `nix-env --query --installed` command. 34 | 35 | $ nix-env --query --installed 36 | $ nix-env -q 37 | 38 | The 39 | [`all-packages.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix#L8107) 40 | file is the source of these commands, which contains the declarations 41 | and definitions of Nix packages. The attributes in this file which are 42 | defined by the `callPackage` or `mkDerivation` functions define a Nix 43 | package, which means we can use these attribute names to install them on 44 | the command line. Note that the implementation of these Nix packages are 45 | stored elsewhere in the `pkgs` directory, which keeps the package list 46 | easy to read. 47 | 48 | Let's install some other packages we found in the `all-packages.nix` 49 | file, such as the `dropbox` and `bitcoin` packages. 50 | 51 | $ nix-env --install firefox 52 | $ nix-env --install dropbox bitcoin 53 | $ nix-env -i dropbox bitcoin 54 | 55 | [[edit](/w/index.php?title=Nix_Installing_Packages&action=edit§ion=3 "Edit section: How to uninstall software packages?")] How to uninstall software packages? 56 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 57 | 58 | And of course, we can uninstall packages by using the 59 | `nix-env --uninstall` command. 60 | 61 | $ nix-env --uninstall firefox 62 | $ nix-env -e firefox 63 | 64 | [[edit](/w/index.php?title=Nix_Installing_Packages&action=edit§ion=4 "Edit section: Further reading")] Further reading 65 | -------------------------------------------------------------------------------------------------------------------------- 66 | 67 | For experienced users, see the [How to find a 68 | package](//Howto find a package in NixOS) wiki page for tips on command 69 | aliases and using file indexing programs. 70 | 71 | More information about how Nix works can be found from the [Nix Main 72 | Page](//Main Page Package Manager). 73 | 74 | -------------------------------------------------------------------------------- /Howto keep multiple packages up to date at once.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Howto_keep_multiple_packages_up_to_date_at_once&action=edit§ion=1 "Edit section: The standard way")] The standard way 2 | ---------------------------------------------------------------------------------------------------------------------------------------------------- 3 | 4 | to keep a set of packages up-to-date in Nix is to install them into a 5 | profile -- typically the default profile -- and to run 6 | 7 | nix-env -u \* 8 | 9 | or possibly even 10 | 11 | nix-env -u \* --always 12 | 13 | However there are some pitfalls: 14 | 15 | 1\) lowPrio packages will be used last. Thus if lowPrio is added to 16 | nixpkgs for any reason it may happen that -u which should update 17 | packages even downgrades a package. Even experienced users do run into 18 | this problem at least once in their life :) 19 | 20 | 2\) You don't know about packages which either got renamed or removed. 21 | Then month later you depend on something and its gone wondering why - 22 | cause you've always had it in your env.. (You can always install old 23 | versions using hydra, still you want to know about those changes). This 24 | is one way to detect missing or renamed packages 25 | 26 | nix-env -i $(nix-env -q \*) --dry-run 27 | 28 | 3\) nix-env -u is slow. Because it does not use attr paths all of nixpkgs 29 | has to be evaluated always. 30 | 31 | 4\) It may happen that you uninstall gimp keeping gimp plugins in your 32 | env. Then you install a newer gimp and wonder why the older plugin does 33 | no longer match the newer gimp, why it does no longer work. You'll spend 34 | time on debugging it. Don't take me verbatim. This is an example about 35 | which kind of issues may happen if you don't use collections for some 36 | purposes. 37 | 38 | [[edit](/w/index.php?title=Howto_keep_multiple_packages_up_to_date_at_once&action=edit§ion=2 "Edit section: The collection way")] The collection way 39 | -------------------------------------------------------------------------------------------------------------------------------------------------------- 40 | 41 | The alternative is using package collections referring to packages by 42 | name. Nix offers a mechanism for that purpose, too, namely the 43 | `buildEnv` function, which can be used as follows: 44 | 45 | # ~/.nixpkgs/config.nix 46 | 47 | { 48 | packageOverrides = pkgs: 49 | { 50 | haskellEnv = pkgs.buildEnv { 51 | name = "haskell-packages"; 52 | paths = with pkgs.haskellPackages; [ghc QuickCheck cmdlib]; 53 | }; 54 | # same can be done for 55 | # myPerlEnv = perl and libs 56 | # myPythonEnv = python and libs 57 | # myGimp = gimp and plugins 58 | # all = pkgs.buildEnv { name = "all"; paths = [haskellEnv myPerlEnv myPythonEnv ... ]; }; 59 | }; 60 | } 61 | 62 | That code snippet creates a "collection package", which consists of the 63 | union of several others, and it can be installed by running either of 64 | the following commands: 65 | 66 | nix-env -iA haskellEnv # accessed by attribute thus faster 67 | nix-env -i haskell-packages 68 | 69 | The easiest way to update a collection is to reinstall it because 70 | nix-env -i usually replaces packages having the same name. Thus 71 | `nix-env -iA all` will tell you that everything still evaluates and 72 | everything is fine. One way to be done. 73 | 74 | The collection `name` attribute usually does not include a version 75 | number, thus "`nix-env -u \*`" is typically not going to update that 76 | package even if its components have changed. In that case, it is 77 | necessary to pass the `--always` flag to the update operation, to 78 | evaluate everything from the ground up. 79 | 80 | Downside: `nix-env -q \*` will not show the contents of a collection. 81 | You have to fall back to nix-store -q operations or look up the contents 82 | in your \~/.nixpkgs/config.nix file 83 | 84 | **Its hard to say which way is better. Try both and use what fits your 85 | needs.** 86 | 87 | -------------------------------------------------------------------------------- /TexLive HOWTO.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=TexLive_HOWTO&action=edit§ion=1 "Edit section: TexLive HOWTO")] TexLive HOWTO 2 | ------------------------------------------------------------------------------------------------------------ 3 | 4 | ### [[edit](/w/index.php?title=TexLive_HOWTO&action=edit§ion=2 "Edit section: TexLive components")] TexLive components 5 | 6 | There is a "core" texlive component and some additional components: 7 | 8 | - nixpkgs\_sys.texLiveContext 9 | - nixpkgs\_sys.texLiveBeamer 10 | - nixpkgs\_sys.texLiveCMSuper 11 | - nixpkgs\_sys.texLive 12 | - nixpkgs\_sys.texLiveExtra 13 | - nixpkgs\_sys.texLiveLatexXColor 14 | - nixpkgs\_sys.texLivePGF 15 | 16 | 17 | 18 | nixpkgs_sys.texLive 19 | 20 | is the "core" component, other components add fonts/styles and extra 21 | functionalities. 22 | 23 | ### [[edit](/w/index.php?title=TexLive_HOWTO&action=edit§ion=3 "Edit section: The problem")] The problem 24 | 25 | - Extra tex components install extra functionalities in locations that 26 | are unknown to the core component (as the core component obviously 27 | does not depend on extra components). 28 | - After installing an extra component, a texlive user will notice that 29 | the extra functionalities are not found by texlive binaries (i.e. 30 | latex) 31 | - There is a file called "ls-R" that should contain all the 32 | tex-related files, and this file should be updated after an extra 33 | component is installed. 34 | - Another way is to add the .../texmf-dist// directories of extra 35 | components into the TEXINPUTS environment variable, i.e. on my 36 | system: 37 | 38 | 39 | 40 | export TEXINPUTS="./:/nix/store/d6xw1wangjq75dw7grh5d9318687hfhi-texlive-extra-2009/texmf-dist//:" 41 | 42 | would just solve the issue without much hassle. However, each time you 43 | upgrade/add an optional texlive component, you should update the 44 | TEXINPUTS environment variable, and this is bad. 45 | 46 | ### [[edit](/w/index.php?title=TexLive_HOWTO&action=edit§ion=4 "Edit section: The Solution ...")] The Solution ... 47 | 48 | Instead of explicitly install texLive components via 49 | /etc/nixos/configuration.nix (environment.systemPackages) or nix-env -i, 50 | one should write a nix-expression using the following function: 51 | 52 | texLiveAggregationFun 53 | 54 | cfr. and 55 | 56 | 57 | #### [[edit](/w/index.php?title=TexLive_HOWTO&action=edit§ion=5 "Edit section: ... using /etc/nixos/configuration.nix")] ... using /etc/nixos/configuration.nix 58 | 59 | Edit /etc/nixos/configuration.nix and add (or edit, if 60 | environment.systemPackages is already set): 61 | 62 | environment = { 63 | systemPackages = [ 64 | ... 65 | (pkgs.texLiveAggregationFun { paths = [ pkgs.texLive pkgs.texLiveExtra pkgs.texLiveBeamer ]; }) 66 | ... 67 | ]; 68 | ... 69 | }; 70 | 71 | the "let myTexLive =" will introduce a new nix-expression using 72 | texLiveAggregationFun { paths = [ all\_your\_texLive\_components\_here 73 | ]; }. the (let myTexLive = ... in myTexLive) will actually evaluate the 74 | function upon a nixos-rebuild switch command. After a nixos-rebuild 75 | switch, all the specified texLive components will be built and their 76 | texmf-dist// scanned, resulting in an environment with a full working 77 | texlive + optional components setup. 78 | 79 | #### [[edit](/w/index.php?title=TexLive_HOWTO&action=edit§ion=6 "Edit section: ... using ~/.nixpkgs/config.nix")] ... using \~/.nixpkgs/config.nix 80 | 81 | Create (or edit) the file \~/.nixpkgs/config.nix to contain the 82 | following code: 83 | 84 | { 85 | packageOverrides = pkgs: 86 | { 87 | myTexLive = with pkgs; texLiveAggregationFun { 88 | paths = [ texLive texLiveExtra texLiveBeamer ]; 89 | }; 90 | }; 91 | } 92 | 93 | and install with 94 | 95 | nix-env -i -A myTexLive 96 | -------------------------------------------------------------------------------- /Main Page Package Manager.page: -------------------------------------------------------------------------------- 1 | The Nix package manager installs, updates, and removes Nix-packaged apps 2 | and libraries. Nix is unique among package managers in that software 3 | installed by Nix is read-only, which ensures that a Nix package's 4 | dependencies will not change when upgrading or removing other packages. 5 | As a result of this design, the Nix package manager has several 6 | desirable side-effects, including atomic package upgrades/rollbacks and 7 | complete dependency graphs for every package. The [About 8 | Nix](http://nixos.org/nix/manual/#idp24368448) chapter of the Nix manual 9 | has more information. 10 | 11 | This page was created by the Nix community to help others understand and 12 | use the Nix package manager. Please help by adding pages for missing 13 | topics and updating information in existing pages. 14 | 15 | [[edit](/w/index.php?title=Main_Page_Package_Manager&action=edit§ion=1 "Edit section: About")] About 16 | ======================================================================================================== 17 | 18 | - [What is a Nix 19 | Package?](/w/index.php?title=Nix_Package&action=edit&redlink=1 "Nix Package (page does not exist)") 20 | 21 | [[edit](/w/index.php?title=Main_Page_Package_Manager&action=edit§ion=2 "Edit section: How to Use")] How to Use 22 | ================================================================================================================== 23 | 24 | [[edit](/w/index.php?title=Main_Page_Package_Manager&action=edit§ion=3 "Edit section: Basics")] Basics 25 | ---------------------------------------------------------------------------------------------------------- 26 | 27 | - [Installing Packages](//Nix Installing Packages) 28 | - [Creating Packages](//Nix Creating Packages) 29 | - [Modifying Packages](//Nix Modifying Packages) 30 | 31 | [[edit](/w/index.php?title=Main_Page_Package_Manager&action=edit§ion=4 "Edit section: Advanced")] Advanced 32 | -------------------------------------------------------------------------------------------------------------- 33 | 34 | - [Advanced Package Management](//Install/remove software) 35 | - [Advanced Package Searching](//Howto find a package in NixOS) 36 | - [How to keep multiple packages up to date at 37 | once](//Howto keep multiple packages up to date at once) - (e.g. 38 | pkgs.misc.collection) 39 | - [How to unpack a package's 40 | sourcecode](//How to unpack a package's sourcecode) 41 | - [How to add large files to the 42 | nix-store](//How to add large files to the nix-store) 43 | - [Modifying Software](//Modify software) 44 | 45 | [[edit](/w/index.php?title=Main_Page_Package_Manager&action=edit§ion=5 "Edit section: Platforms")] Platforms 46 | ================================================================================================================ 47 | 48 | - [CrossCompiling](//CrossCompiling) 49 | - [Nix on Windows](//Nix on Windows) 50 | 51 | [[edit](/w/index.php?title=Main_Page_Package_Manager&action=edit§ion=6 "Edit section: Languages")] Languages 52 | ================================================================================================================ 53 | 54 | - [How to develop on NixOS](//Howto develop software on nixos) - (NOT 55 | how to develop \*for\* NixOS or Nix) 56 | - [Haskell](//Haskell) 57 | - [Python](//Python) 58 | - [Ruby](//Ruby) 59 | - [Android](//Android) 60 | - [Plone development](//Plone development) 61 | 62 | [[edit](/w/index.php?title=Main_Page_Package_Manager&action=edit§ion=7 "Edit section: Issues")] Issues 63 | ========================================================================================================== 64 | 65 | - [Terms and Definitions in Nix 66 | Project](//Terms and Definitions in Nix Project) 67 | - [Error Messages](//Error Messages) 68 | - [Solve GConf errors when running GNOME applications (such as 69 | GnuCash)](//Solve GConf errors when running GNOME applications) 70 | - [FAQ](//FAQ) 71 | - [NixOS Project on GitHub](https://github.com/NixOS): Search for or 72 | create issues 73 | 74 | -------------------------------------------------------------------------------- /Nix(OS) related repositories and work.page: -------------------------------------------------------------------------------- 1 | For various reasons some work has not been committed to the main trunk 2 | repositories. You find a description about some of them here: 3 | 4 | [[edit](/w/index.php?title=Nix(OS)_related_repositories_and_work&action=edit§ion=1 "Edit section: Haskell overlay (stable)")] Haskell overlay (stable) 5 | ---------------------------------------------------------------------------------------------------------------------------------------------------------- 6 | 7 | Let's you install nearly all hackage packages easily. Older and newer 8 | gtk2hs supported. [hack-nix](http://haskell.org/haskellwiki/Hack-Nix) 9 | also provides a convenient way to setup multiple build environments for 10 | a project 11 | [nixpkgs-haskell-overlay](http://github.com/MarcWeber/nixpkgs-haskell-overlay) 12 | 13 | [[edit](/w/index.php?title=Nix(OS)_related_repositories_and_work&action=edit§ion=2 "Edit section: Ruby overlay (stable)")] Ruby overlay (stable) 14 | ---------------------------------------------------------------------------------------------------------------------------------------------------- 15 | 16 | See [nixpkgs-ruby-overlay](//Nixpkgs-ruby-overlay). 17 | 18 | [[edit](/w/index.php?title=Nix(OS)_related_repositories_and_work&action=edit§ion=3 "Edit section: Python overlay (experimental)")] Python overlay (experimental) 19 | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 | 21 | purpose: abstract away tedious task of finding matching versions and 22 | packaging python packages (source: PyPi package index) Let's you install 23 | all packages known by gem. (Contact Marc Weber if you want to try it, 24 | you need some more patches). Open issues: How to find out which package 25 | has to be run with python-2.x or python-3 and such. 26 | [nixpkgs-python-overlay](https://gitorious.org/nixpkgs-python-overlay/) 27 | 28 | [[edit](/w/index.php?title=Nix(OS)_related_repositories_and_work&action=edit§ion=4 "Edit section: nixpkgs-utilities")] nixpkgs-utilities 29 | -------------------------------------------------------------------------------------------------------------------------------------------- 30 | 31 | a very small collection of scripts you can run to verify that you don't 32 | break too much when comitting. This is work in progress 33 | [nixpkgs-dev-utilities](http://gitorious.org/nixpkgs-dev-utilities/). 34 | Current goals: 35 | 36 | - verify that everything still evaluates 37 | - verify that most important things build on your system 38 | - preview of what will be rebuild if you change something 39 | 40 | [[edit](/w/index.php?title=Nix(OS)_related_repositories_and_work&action=edit§ion=5 "Edit section: ocamlPackages")] ocamlPackages 41 | ------------------------------------------------------------------------------------------------------------------------------------ 42 | 43 | A small collections of [OCaml](http://caml.inria.fr/)-related packages: 44 | [download](http://www.math.unifi.it/~maggesi/ocamlPackages). 45 | 46 | Reasons for not committing it to trunk: Proof of concept, still 47 | experimenting, trying to find a good way to cope with findlib and other 48 | OCaml-specific practices. 49 | 50 | [[edit](/w/index.php?title=Nix(OS)_related_repositories_and_work&action=edit§ion=6 "Edit section: nanonixos")] nanonixos 51 | ---------------------------------------------------------------------------------------------------------------------------- 52 | 53 | cross compiled nixos by Lluis 54 | Batlle i Rossell 55 | 56 | [[edit](/w/index.php?title=Nix(OS)_related_repositories_and_work&action=edit§ion=7 "Edit section: guix")] guix 57 | ------------------------------------------------------------------------------------------------------------------ 58 | 59 | GNU Guix is a purely functional package manager, and associated free 60 | software distribution, for the GNU system based on nix initiated by 61 | Ludovic Courtes 62 | 63 | -------------------------------------------------------------------------------- /Howto find a package in NixOS.page: -------------------------------------------------------------------------------- 1 | This page's intended audience is advanced Nix users. For a 2 | newbie-friendly and more up-to-date page, see [Installing 3 | Packages](//Nix Installing Packages) 4 | 5 | [[edit](/w/index.php?title=Howto_find_a_package_in_NixOS&action=edit§ion=1 "Edit section: Simple package query")] Simple package query 6 | ------------------------------------------------------------------------------------------------------------------------------------------ 7 | 8 | The most straight-forward way to see a list of all available packages is 9 | to use the `nix-env` command. This method is a bit slow, as every 10 | package must be evaluated when generating the list. (Note: In the 11 | results, the first column is the package's attribute path.) 12 | 13 | nix-env -qa [-P] [--out-path] [ -f $NIXPKGS_ALL ] 14 | 15 | [[edit](/w/index.php?title=Howto_find_a_package_in_NixOS&action=edit§ion=2 "Edit section: Aliases")] Aliases 16 | ---------------------------------------------------------------------------------------------------------------- 17 | 18 | The command to query available packages is relatively long, but we can 19 | define shortcuts or aliases. To define a shell function as an alias, 20 | Bash-shell users can add this to their `~/.bashrc` file. 21 | 22 | queryNixPkgs(){ nix-env -qa \* -P -f $NIXPKGS_ALL | grep -i "$1"; } 23 | 24 | [[edit](/w/index.php?title=Howto_find_a_package_in_NixOS&action=edit§ion=3 "Edit section: Install by attribute")] Install by attribute 25 | ------------------------------------------------------------------------------------------------------------------------------------------ 26 | 27 | A package can be defined in a few different ways. Sometimes, a package 28 | is implemented in a complicated way, likely to share part of its 29 | definition with another package. In a case like this, a package may be 30 | defined in an attribute set one level deeper than the usual package set 31 | defined in the `top-level/all-packages.nix` file. 32 | 33 | For example, the following Nix expression contains the `myPackage` 34 | package, defined in a deep attribute set. 35 | 36 | { 37 | attr = { subattr = { subattr = { myPackage = mkDerivation ...; } } } 38 | # Or, an alternative notation: 39 | attr.subattr.subattr.package = mkDerivation ...; 40 | } 41 | 42 | Packages which are defined in a set deeper than normal can be added to a 43 | higher-level set by using the `recurseIntoAttrs` function. If they are 44 | included in a higher-level set, their installation should be simple. If 45 | not, the package can be referenced by using its full attribute path in 46 | an expression. 47 | 48 | For example, to install the package defined in the above Nix expression, 49 | pass its full attribute path to the `nix-env` program and use the `-A` 50 | flag. 51 | 52 | nix-env -i -A attr.subattr.subattr.package 53 | 54 | [[edit](/w/index.php?title=Howto_find_a_package_in_NixOS&action=edit§ion=4 "Edit section: Indexing and searching Nix files")] Indexing and searching Nix files 55 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 56 | 57 | One method of quickly finding the attribute names of packages is to use 58 | the Ctags program, which is a tool used for code navigation. To use this 59 | method, install the 60 | [`ctagsWrapped`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/misc/ctags/wrapped.nix) 61 | package, then use the `ctags` command line program to index Nix files or 62 | directories of Nix files, such as a directory which contains the NixPkgs 63 | repository. This package customizes a ctags installation by adding a 64 | definition for the Nix syntax. To learn more about the Ctags program, 65 | read the [ctags website](http://ctags.sourceforge.net/). 66 | 67 | Another method of indexing Nix expressions is to use the ID Utils 68 | program. The [IdUtils](//HOWTO:idutils) wiki page has more details. To 69 | learn more about the ID Utils program, read the [ID Utils 70 | website](https://www.gnu.org/software/idutils/). 71 | 72 | -------------------------------------------------------------------------------- /How to install NixOS from Linux.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=How_to_install_NixOS_from_Linux&action=edit§ion=1 "Edit section: How to install NixOS from Linux")] How to install NixOS from Linux 2 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 3 | 4 | You already have a running linux and a functional grub on your primary 5 | partition and you don't want to waste a CD-R as you feel that you really 6 | don't need to? Right. We also assume that you have a "spare" partition 7 | where to install NixOS ready. 8 | 9 | to simplify: 10 | 11 | /dev/sda1  : your boot partition, containing already working grub 12 | 13 | /dev/sda2  : your linux root partition, containing your currently 14 | working OS 15 | 16 | /dev/sda3  : your spare partition to where you will install NixOS 17 | 18 | the\_iso  : the nixos livecd iso 19 | 20 | \~/some\_dir : directory where "the\_iso" is (loop) mounted 21 | 22 | /boot  : the boot directory, where grub is installed (/dev/sda1 and 23 | /dev/sda2 \*can\* be the same partition!) 24 | 25 | ### [[edit](/w/index.php?title=How_to_install_NixOS_from_Linux&action=edit§ion=2 "Edit section: Unpacking the ISO image")] Unpacking the ISO image 26 | 27 | - obtain the ISO "the\_iso" 28 | - mount -o loop "the\_iso" "\~/some\_dir" 29 | - (mount the /boot partition, containing your working grub) 30 | - cp some\_dir/boot/bzImage /boot/nixos-livecd-bzImage 31 | - cp some\_dir/boot/initrd /boot/nixos-livecd-initrd 32 | - cp some\_dir/nix-store.squashfs /nix-store.squashfs 33 | 34 | ### [[edit](/w/index.php?title=How_to_install_NixOS_from_Linux&action=edit§ion=3 "Edit section: Modifying your bootloader's config")] Modifying your bootloader's config 35 | 36 | Look at some\_dir/boot/grub/grub.cfg. This is Grub-2 main config file of 37 | the ISO. Locate the NixOS menuentry section: 38 | 39 | menuentry "NixOS Installer / Rescue" { 40 | linux /boot/bzImage init=/nix/store/p5n72ay1c1wx4wry90zabr8jnljpdzgx-nixos-0.2pre4601_1def5ba-48a4e91/init root=LABEL=NIXOS_0.2pre4601_1def5ba-48a4e91 41 | initrd /boot/initrd 42 | } 43 | 44 | The goal is to tell your bootloader to boot /nixos-livecd-bzImage with 45 | correct init argument. 46 | 47 | #### [[edit](/w/index.php?title=How_to_install_NixOS_from_Linux&action=edit§ion=4 "Edit section: Grub < 2")] Grub \< 2 48 | 49 | To setup grub-1, edit your /boot/grub/menu.lst (or equivalent). Add 50 | following lines to the config: 51 | 52 | title NixOS LiveCD 53 | kernel /nixos-livecd-bzImage init=/nix/store/p5n72ay1c1wx4wry90zabr8jnljpdzgx-nixos-0.2pre4601_1def5ba-48a4e91/init root=/dev/sda2 splash=verbose vga=0x317 54 | initrd /nixos-livecd-initrd 55 | 56 | Note, that hash should match with what you have seen in 57 | some\_dir/grub/grub.cfg 58 | 59 | Go to the reboot section 60 | 61 | #### [[edit](/w/index.php?title=How_to_install_NixOS_from_Linux&action=edit§ion=5 "Edit section: GRUB 2")] GRUB 2 62 | 63 | A grub entry for ubuntu might look like this: 64 | 65 | menuentry "NixOS Installer / Rescue" { 66 | linux /nixos-livecd-bzImage init=/nix/store/p5n72ay1c1wx4wry90zabr8jnljpdzgx-nixos-0.2pre4601_1def5ba-48a4e91/init root=/dev/sda2 67 | initrd /nixos-lived-initrd 68 | } 69 | 70 | #### [[edit](/w/index.php?title=How_to_install_NixOS_from_Linux&action=edit§ion=6 "Edit section: Other bootloaders")] Other bootloaders 71 | 72 | Should also work. Please add instructions here. 73 | 74 | ### [[edit](/w/index.php?title=How_to_install_NixOS_from_Linux&action=edit§ion=7 "Edit section: Booting into LiveCD")] Booting into LiveCD 75 | 76 | Reboot. Select "NixOS LiveCD" from the bootloader menu. If everything is 77 | OK, you will see Login prompt asking you to login as root with empty 78 | password. *DO NOT TRUST IT BLINDLY.* You probably have your /etc mounted 79 | from /dev/sda2 so it contains your old passwd (as well as LiveCD stuff 80 | merged into by the means of UnionFS). So if empty password is not 81 | working, try your old root password. 82 | 83 | Thats it. Now follow the manual (Alt-F8), mount /dev/sda3 as /mnt, do 84 | nixos-option and so on. 85 | 86 | -------------------------------------------------------------------------------- /Main Page NixOS Desktop.page: -------------------------------------------------------------------------------- 1 | NixOS is a Linux distribution which is based on using the Nix language 2 | as its package manager and for OS configuration. Because the entire 3 | environment is managed by Nix, modifying the OS is an atomic operation 4 | which can be "undone" if unintended side-effects are discovered. 5 | 6 | This page was created by the Nix community to help others understand and 7 | use the Nix package manager. Please help by adding pages for missing 8 | topics and updating information in existing pages. 9 | 10 | [[edit](/w/index.php?title=Main_Page_NixOS_Desktop&action=edit§ion=1 "Edit section: How to Use")] How to Use 11 | ================================================================================================================ 12 | 13 | - [Real World NixOS Dotfiles](//Real World NixOS Dotfiles) - (Learn by 14 | seeing different configurations.) 15 | - [NixOS Filesystem Notes](//NixOS Filesystem Notes) 16 | - [Module Syntax](//NixOS:Modules) 17 | - [Extending NixOS](//NixOS:extend NixOS) 18 | 19 | [[edit](/w/index.php?title=Main_Page_NixOS_Desktop&action=edit§ion=2 "Edit section: On Physical Machine")] On Physical Machine 20 | ================================================================================================================================== 21 | 22 | - [Creating a Nix OS live CD](//Creating a Nix OS live CD) - Live CD 23 | or USB boot stick 24 | - [How to install NixOS from a USB 25 | stick](//Installing NixOS from a USB stick) 26 | - [How to install NixOS from Linux](//How to install NixOS from Linux) 27 | - [Multiplatform NixOS](//Multiplatform NixOS) - (PC, QEMU ARM 28 | Versatile, SheevaPlug, Fuloong Mini-PC, Raspberry Pi) 29 | 30 | [[edit](/w/index.php?title=Main_Page_NixOS_Desktop&action=edit§ion=3 "Edit section: Configuration Files for Hardware")] Configuration Files for Hardware 31 | ------------------------------------------------------------------------------------------------------------------------------------------------------------ 32 | 33 | - [Acer 4810T](//Acer 4810T) 34 | - [ASUS M60J-JX041V](//ASUS M60J-JX041V) 35 | - [ASUS 36 | N53JN-SZ074V](/w/index.php?title=ASUS_N53JN-SZ074V&action=edit&redlink=1 "ASUS N53JN-SZ074V (page does not exist)") 37 | - [Airis N990](//Airis N990) 38 | - [Compaq Presario 39 | 2144EA](/w/index.php?title=Compaq_Presario_2144EA&action=edit&redlink=1 "Compaq Presario 2144EA (page does not exist)") 40 | - [Lenovo Thinkpad x200](//Lenovo Thinkpad x200) 41 | - [Lenovo Thinkpad Helix](//Lenovo Thinkpad Helix) 42 | - [Samsung NP900X3c](//Samsung NP900X3c) 43 | 44 | [[edit](/w/index.php?title=Main_Page_NixOS_Desktop&action=edit§ion=4 "Edit section: Advanced Configuration")] Advanced Configuration 45 | ---------------------------------------------------------------------------------------------------------------------------------------- 46 | 47 | - [Hardened NixOS (More Secure)](//Hardened NixOS) 48 | 49 | [[edit](/w/index.php?title=Main_Page_NixOS_Desktop&action=edit§ion=5 "Edit section: On Virtual Machine")] On Virtual Machine 50 | ================================================================================================================================ 51 | 52 | - [How to install NixOS on VirtualBox](//InstallingOnVirtualBox) 53 | - [NixOS and Xen](//NixOS and Xen) 54 | - [NixOS and OpenStack Compute](//NixOS and OpenStack Compute) 55 | - [NixOS and libvirt](//NixOS and libvirt) 56 | - [How to install NixOS as OpenVZ 57 | guest](//Install NixOS as OpenVZ guest) 58 | 59 | [[edit](/w/index.php?title=Main_Page_NixOS_Desktop&action=edit§ion=6 "Edit section: On Hosting Provider")] On Hosting Provider 60 | ================================================================================================================================== 61 | 62 | - [Hosting providers & NixOS](//Hosting providers & NixOS) 63 | - [How to install NixOS on Amazon EC2](//NixOS on Amazon EC2) 64 | - [How to install Nix OS on a hetzner rootserver](//NixOS on Hetzner) 65 | - [How to install NixOS on linode.com](//Install NixOS on Linode) 66 | - [How to install NixOS on 67 | Rackspace](//Install NixOS on Rackspace Cloud Servers) 68 | 69 | -------------------------------------------------------------------------------- /Wpa supplicant.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Wpa_supplicant&action=edit§ion=1 "Edit section: Wireless networking")] Wireless networking 2 | ========================================================================================================================= 3 | 4 | NixOS' uses wpa\_supplicant for wireless networking. This article 5 | describes how to configure NixOS to use wpa\_supplicant and to connect 6 | to a variety of wireless networks. 7 | 8 | [[edit](/w/index.php?title=Wpa_supplicant&action=edit§ion=2 "Edit section: Configuration")] Configuration 9 | ------------------------------------------------------------------------------------------------------------- 10 | 11 | To enable wireless networking add the following attribute to your 12 | `configuration.nix` and reconfigure your system. 13 | 14 | networking.wireless.enable = true; 15 | 16 | You should already have set `networking.hostName` and it might be 17 | mandatory for wireless networking to have this set. (Is this true?) 18 | 19 | It might also be a good idea to enable a firewall by setting 20 | `networking.firewall.enable = true;`. (Explain pros and cons.) 21 | 22 | [[edit](/w/index.php?title=Wpa_supplicant&action=edit§ion=3 "Edit section: Prerequisites")] Prerequisites 23 | ------------------------------------------------------------------------------------------------------------- 24 | 25 | Before proceeding make sure to check whether your wireless network card 26 | has properly been recognized. You can check this by issuing `iwconfig` 27 | and you should see a wireless extension being reported for `wlan0`. 28 | 29 | ### [[edit](/w/index.php?title=Wpa_supplicant&action=edit§ion=4 "Edit section: Scan for wireless networks")] Scan for wireless networks 30 | 31 | To scan for wireless networks in range you can use the following 32 | command. 33 | 34 | iwlist wlan0 scan 35 | 36 | [[edit](/w/index.php?title=Wpa_supplicant&action=edit§ion=5 "Edit section: Wirless networks")] Wirless networks 37 | ------------------------------------------------------------------------------------------------------------------- 38 | 39 | Configuration of wireless networks is being done in 40 | `/etc/wpa_supplicant.conf`. This file is readable and writable by root 41 | only so make sure to have root privileges before editing. Since this 42 | file contains plain passwords for wireless networks you shouldn't 43 | attempt to make this file readable by any other account than root. 44 | 45 | The file `/etc/wpa_supplicant.conf` contains a lot of configuration and 46 | documentation already. However, these are sensible default values which 47 | should work in most cases. As of now don't touch them unless something 48 | isn't working as expected or you know what you are doing. 49 | 50 | To the end of the file you can describe the wireless networks you want 51 | to connect to. In most cases you only need to specify a *essid* and a 52 | *passphrase*. To add a wireless network called `mynetwork` with 53 | passphrase `mysecretpass` add the following contents to the end of the 54 | file `/etc/wpa_supplicant.conf`. 55 | 56 | network={ 57 | ssid="mynetwork" 58 | psk="mysecretpassphrase" 59 | } 60 | 61 | You now should reconfigure your system again and wpa\_supplicant should 62 | take care of automatically getting you connected as soon as you are in 63 | range for any of the networks specified in `/etc/wpa_supplicant.conf`. 64 | 65 | You don't need the human-readable passphrase stored in 66 | `/etc/wpa_supplicant.conf`: 67 | 68 | `wpa_passphrase 'mynetwork' 'mysecretpassphrase' | grep -v '#psk="' >> /etc/wpa_supplicant.conf` 69 | 70 | This will append to `/etc/wpa_supplicant.conf` something like this: 71 | 72 | network={ 73 | ssid="mynetwork" 74 | psk=d2b1d5f68ef2c2b04a89361f0722e65a1591de6d82b979d03fabf501c4356589 75 | } 76 | 77 | ### [[edit](/w/index.php?title=Wpa_supplicant&action=edit§ion=6 "Edit section: Insecure wireless networks")] Insecure wireless networks 78 | 79 | To connect to a wireless network named `insecureNetwork` which isn't 80 | secured by a passphrase use the following configuration. 81 | 82 | network={ 83 | ssid="insecureNetwork" 84 | key_mgmt=NONE 85 | } 86 | -------------------------------------------------------------------------------- /Installing VirtualBox on NixOS.page: -------------------------------------------------------------------------------- 1 | This page describes how to run VirtualBox on NixOS. 2 | 3 | [[edit](/w/index.php?title=Installing_VirtualBox_on_NixOS&action=edit§ion=1 "Edit section: Enabling VirtualBox")] Enabling VirtualBox 4 | ----------------------------------------------------------------------------------------------------------------------------------------- 5 | 6 | +--------------------------------------------------------------------------+ 7 | | **WARNING: VirtualBox is currently built with the "--disable-hardening" | 8 | | flag. This is a security risk and we need to fix it. See | 9 | | ** | 10 | +--------------------------------------------------------------------------+ 11 | 12 | Add the following to your `configuration.nix`: 13 | 14 | imports = [ ]; 15 | 16 | Then run: 17 | 18 | $ nixos-rebuild switch 19 | 20 | VirtualBox is only available to users in the `vboxusers` group. So to 21 | enable VirtualBox for user `alice`, do: 22 | 23 | $ usermod -a -G vboxusers alice 24 | 25 | ### [[edit](/w/index.php?title=Installing_VirtualBox_on_NixOS&action=edit§ion=2 "Edit section: Enabling VirtualBox Extension Pack")] Enabling VirtualBox Extension Pack 26 | 27 | This is necessary for the USB subsystem and remote desktop access. 28 | Unfortunately, the extension pack is behind a license agrreement, you 29 | have to download it manually: 30 | 31 | Get *Oracle\_VM\_VirtualBox\_Extension\_Pack-4.2.12-84980.vbox-extpack* 32 | from . 33 | 34 | Then add it to the Nix store: 35 | 36 | nix-prefetch-url file://Oracle_VM_VirtualBox_Extension_Pack-4.2.12-84980.vbox-extpack 37 | 38 | Override the VirtualBox package to enable the extension pack: 39 | 40 | boot.kernelPackages = pkgs.linuxPackages // { 41 | virtualbox = pkgs.linuxPackages.virtualbox.override { 42 | enableExtensionPack = true; 43 | }; 44 | }; 45 | 46 | (Replace *pkgs.linuxPackages* with the package set you want to use) 47 | 48 | or set nixos option: 49 | 50 | nixpkgs.config.virtualbox.enableExtensionPack = true; 51 | 52 | Switch to the new system configuration: 53 | 54 | nixos-rebuild switch 55 | 56 | This will take a long time because Nix will compile VirtualBox from 57 | source. 58 | 59 | [[edit](/w/index.php?title=Installing_VirtualBox_on_NixOS&action=edit§ion=3 "Edit section: Running VirtualBox")] Running VirtualBox 60 | --------------------------------------------------------------------------------------------------------------------------------------- 61 | 62 | Just do: 63 | 64 | $ VirtualBox 65 | 66 | Note since there is no setuid root you can not ping from the guest 67 | machines!! 68 | 69 | [[edit](/w/index.php?title=Installing_VirtualBox_on_NixOS&action=edit§ion=4 "Edit section: Error messages")] Error messages 70 | ------------------------------------------------------------------------------------------------------------------------------- 71 | 72 | Since this expression implements the open source VirtualBox it **does 73 | not include VirtualBox Extension Pack(s)**. 74 | 75 | ### [[edit](/w/index.php?title=Installing_VirtualBox_on_NixOS&action=edit§ion=5 "Edit section: Failed to access the USB subsystem")] Failed to access the USB subsystem 76 | 77 | The message: 78 | 79 | Failed to access the USB subsystem. 80 | VirtualBox is not currently allowed to access USB devices. You can change this by allowing your user to access the 'usbfs' folder and files. Please see the user manual for a more detailed explanation. 81 | 82 | Shows that you do not have access to the usbfs. **Such USB access might 83 | require Oracle VirtualBox (non-free) and the VirtualBox Extension Pack 84 | installed** on the Host computer, as well as the user being part of the 85 | vboxusers group. 86 | 87 | ### [[edit](/w/index.php?title=Installing_VirtualBox_on_NixOS&action=edit§ion=6 "Edit section: Missing kernel modules")] Missing kernel modules 88 | 89 | If you get this error message (like this), something went wrong: 90 | 91 | /dev/vboxdrv does not exist. Load the kernel module then try again. 92 | 93 | If in doubt, try rebooting to make sure the kernel module is loaded. 94 | 95 | -------------------------------------------------------------------------------- /Vimprobable.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=Vimprobable&action=edit§ion=1 "Edit section: Vimprobable")] Vimprobable 2 | ====================================================================================================== 3 | 4 | Vimprobable is a web browser that behaves like the [Vimperator 5 | plugin](http://www.vimperator.org/) available for Mozilla Firefox. It is 6 | based on the WebKit engine (using GTK bindings). The goal of Vimprobable 7 | is to build a completely keyboard-driven, efficient and pleasurable 8 | browsing-experience. Its featureset might be considered "minimalistic", 9 | but not as minimalistic as being completely featureless. 10 | 11 | Vimprobable is available in two versions, that is vimprobable and 12 | vimprobable2. As of now only vimprobable2 is available and vimprobable 13 | will be used synonymously with vimprobable2 from now on. 14 | 15 | [[edit](/w/index.php?title=Vimprobable&action=edit§ion=2 "Edit section: Installation")] Installation 16 | -------------------------------------------------------------------------------------------------------- 17 | 18 | $ nix-env -i vimprobable2 19 | 20 | [[edit](/w/index.php?title=Vimprobable&action=edit§ion=3 "Edit section: Usage")] Usage 21 | ------------------------------------------------------------------------------------------ 22 | 23 | vimprobable is able -- and intended -- to be completely keyboard-driven. 24 | Citing from vimprobable's manual page here are a few basic commands that 25 | should keep you going. 26 | 27 | ------------------------------------------------------------------------- 28 | Key 29 | Action 30 | ------------------------------------ ------------------------------------ 31 | o t 32 | Insert URL from keyboard and load it Insert URL from keyboard and load it 33 | into new window 34 | ------------------------------------------------------------------------- 35 | 36 | : Basic commands 37 | 38 | Be sure to read `man vimprobable2` eventually to learn all the other 39 | important commands. 40 | 41 | [[edit](/w/index.php?title=Vimprobable&action=edit§ion=4 "Edit section: Configuration")] Configuration 42 | ---------------------------------------------------------------------------------------------------------- 43 | 44 | vimprobable looks for configuration files in 45 | `$HOME/.config/vimprobable`. The basic configuration is done in 46 | `vimprobablerc`. To create this file issue the following commands. 47 | 48 | $ mkdir -p $HOME/.config/vimprobable 49 | $ touch $HOME/.config/vimprobable/vimprobablerc 50 | 51 | See `man vimprobablerc` for configuration options. 52 | 53 | ### [[edit](/w/index.php?title=Vimprobable&action=edit§ion=5 "Edit section: Search engines")] Search engines 54 | 55 | vimprobable can be configured to use a variety of search engines. A 56 | benefit from configuring a search engine is that you can use them for 57 | URLs. For example you can just type `g NixOS` to search for *NixOS* on 58 | Google. The following example sets up the search engines Google 59 | (shortcut `g`), Wikipedia (shortcut `w`) and NixOS wiki (shortcut `wn`). 60 | 61 | $ touch $HOME/.config/vimprobable/searchengines 62 | $ cat << EOF 63 | g https://google.com/search?q=%s 64 | nw https://nixos.org/wiki/Special:Search?search=%s 65 | w https://secure.wikimedia.org/wikipedia/en/w/index.php?search=%s 66 | $ EOF > $HOME/.config/vimprobable/searchengines 67 | 68 | See `man vimprobable2` for default search engines that come with 69 | vimprobable. 70 | 71 | ### [[edit](/w/index.php?title=Vimprobable&action=edit§ion=6 "Edit section: Tab support")] Tab support 72 | 73 | vimprobable doesn't offer tab support. However, you can use 74 | [tabbed](http://tools.suckless.org/tabbed) for that. Install tabbed and 75 | create an alias to vimprobable2 as following. 76 | 77 | $ nix-env -i tabbed 78 | 79 | $ alias vimprobable2="vimprobable2 -e \"\$(tabbed -d)\"" 80 | 81 | You can switch tabs by pressing `gt` or `gT`. 82 | 83 | [[edit](/w/index.php?title=Vimprobable&action=edit§ion=7 "Edit section: References")] References 84 | ---------------------------------------------------------------------------------------------------- 85 | 86 | - [Official website](http://sourceforge.net/apps/trac/vimprobable/) 87 | 88 | -------------------------------------------------------------------------------- /NixOS VM tests.page: -------------------------------------------------------------------------------- 1 | The NixOS source tree contains tests that use automatically instantiated 2 | virtual machines to test various features of the system. These tests 3 | define virtual networks of virtual NixOS machines and test scripts that 4 | use them. This approach is described in an [ISSRE-2010 5 | paper](http://www.st.ewi.tudelft.nl/~dolstra/pubs/decvms-issre2010-final.pdf). 6 | While it uses NixOS in the VMs, it is not limited to testing NixOS: if 7 | you have a (distributed) application or system-level package that you 8 | wish to test automatically, you can use the NixOS VM testing framework. 9 | Note that NixOS is *not* required on the host system - any Linux system 10 | (such as Ubuntu) with KVM support should work. 11 | 12 | [[edit](/w/index.php?title=NixOS_VM_tests&action=edit§ion=1 "Edit section: Running a test")] Running a test 13 | --------------------------------------------------------------------------------------------------------------- 14 | 15 | If you don't have NixOS as your host OS, you should first [install the 16 | Nix package manager](http://nixos.org/nix/download.html) and obtain the 17 | Nixpkgs and NixOS source trees: 18 | 19 | $ git clone https://github.com/NixOS/nixpkgs nixpkgs 20 | 21 | To speed up builds by using pre-built binaries, you should do: 22 | 23 | $ nix-pull http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST 24 | 25 | Now you can run a test as follows: 26 | 27 | $ nix-build nixpkgs/tests/nfs.nix 28 | 29 | This performs an automated test of the NFS client and server 30 | functionality in the Linux kernel, including file locking semantics 31 | (e.g., whether locks are maintained across server crashes). It will 32 | first build or download all the dependencies of the test (e.g., all 33 | packages needed to run a NixOS VM). The test is defined in 34 | `nixos/tests/nfs.nix`. If the test succeeds, `nix-build` will place a 35 | symlink `./result` in the current directory pointing at the location in 36 | the Nix store of the test results (e.g., screenshots, test reports, and 37 | so on). In particular, a pretty-printed log of the test is written to 38 | `log.html`, which you can view by doing something like 39 | 40 | $ firefox ./result/log.html 41 | 42 | ### [[edit](/w/index.php?title=NixOS_VM_tests&action=edit§ion=2 "Edit section: Interactive testing")] Interactive testing 43 | 44 | [![Interactive 45 | VMs](/w/images/thumb/e/e9/Nixos-interactive-vms.png/180px-Nixos-interactive-vms.png)](//File:Nixos-interactive-vms.png) 46 | 47 | [![](/w/skins/common/images/magnify-clip.png)](//File:Nixos-interactive-vms.png) 48 | 49 | Screenshot of running the NFS test environment interactively. 50 | 51 | It is also possible to run the test environment interactively, allowing 52 | you to experiment with the VMs. For example: 53 | 54 | $ nix-build nixos/tests/ -A nfs.driver 55 | $ ./result/bin/nixos-run-vms 56 | 57 | The script `nixos-run-vms` starts the three virtual machines defined in 58 | the NFS test using QEMU/KVM. The root filesystem of the VMs is created 59 | on the fly and kept across VM restarts in `./hostname.qcow2`. 60 | 61 | Finally, you can run the test itself interactively. This is particularly 62 | useful when developing or debugging a test. 63 | 64 | $ nix-build nixos/tests/ -A nfs.driver 65 | $ ./result/bin/nixos-test-driver 66 | starting VDE switch for network 1 67 | > 68 | 69 | You can now type Perl statements to execute commands to start or 70 | manipulate the VMs: 71 | 72 | > startAll; 73 | (the VMs start booting) 74 | > $server->waitForJob("nfs-kernel-nfsd"); 75 | > $client1->succeed("flock -x /data/lock -c 'sleep 100000' &"); 76 | > $client2->fail("flock -n -s /data/lock true"); 77 | > $client1->shutdown; 78 | (this releases client1's lock) 79 | > $client2->succeed("flock -n -s /data/lock true"); 80 | 81 | The function `testScript` executes the entire test script and drops you 82 | back into the test driver command line upon its completion. This allows 83 | you to inspect the state of the VMs after the test (e.g. to debug the 84 | test script). 85 | 86 | [[edit](/w/index.php?title=NixOS_VM_tests&action=edit§ion=3 "Edit section: Writing tests")] Writing tests 87 | ------------------------------------------------------------------------------------------------------------- 88 | 89 | TODO 90 | 91 | -------------------------------------------------------------------------------- /KDE.page: -------------------------------------------------------------------------------- 1 | [[edit](/w/index.php?title=KDE&action=edit§ion=1 "Edit section: WikiPedia Definition")] WikiPedia Definition 2 | ---------------------------------------------------------------------------------------------------------------- 3 | 4 | > *KDE* (/ˌkeɪdiːˈiː/) *is an international free software community 5 | > producing an integrated set of cross-platform applications designed to 6 | > run on Linux, FreeBSD, Solaris, Microsoft Windows, and OS X systems. 7 | > It is known for its Plasma Desktop, a desktop environment provided as 8 | > the default working environment on many Linux distributions, such as 9 | > openSUSE, Mageia and Kubuntu and is default desktop environment on 10 | > PC-BSD, a BSD operating system.* 11 | 12 | [[edit](/w/index.php?title=KDE&action=edit§ion=2 "Edit section: KDE on Nix")] KDE on Nix 13 | -------------------------------------------------------------------------------------------- 14 | 15 | KDE and Nix are both cross-platform. Add hydra and Disnix in to the mix 16 | and you have the means to create local, private and secure application 17 | deployment network that is cross-platform. Add to the fact that KDE and 18 | Nix(OS) are very versatile in regards to options and configurations that 19 | you give the user, administrator or developer a lot of leeway to develop 20 | and deploy stable production environments. 21 | 22 | [[edit](/w/index.php?title=KDE&action=edit§ion=3 "Edit section: The code behind KDE")] The code behind KDE 23 | -------------------------------------------------------------------------------------------------------------- 24 | 25 | The reason why KDE is cross-platform compatible is because it bases it 26 | self on the C++ GUI framework QT. QT was developed by Trolltech and has 27 | since been sold and re-sold again to different commercial outfits. But 28 | it has not deterred the development of the KDE suite and it still serves 29 | as one of the best examples of what QT is capable of doing. 30 | 31 | [[edit](/w/index.php?title=KDE&action=edit§ion=4 "Edit section: How to install KDE")] How to install KDE 32 | ------------------------------------------------------------------------------------------------------------ 33 | 34 | *1. Open a terminal and two text editor windows/tabs* 35 | 36 | *2. Open `/etc/nixos/configurations.nix` and 37 | `/etc/nixos/hardware-configurations.nix`* 38 | 39 | *3. Either find or create a `services.xserver` entry, like so* 40 | 41 | services.xserver = { 42 | displayManager.kdm.enable = true; 43 | desktopManager.kde4.enable = true; 44 | }; 45 | 46 | (services.xserver) 47 | : Rather than writing *services.xserver* at the beginning of every 48 | variable we make it into an array to make the editing and scope of 49 | the subject easier by abstraction. 50 | (services.xserver.)displayManager.kdm.enable 51 | : uses KDM as the default login screen 52 | (services.xserver.)desktopManager.kde4.enable 53 | : uses KDE as the default desktop environment 54 | 55 | [[edit](/w/index.php?title=KDE&action=edit§ion=5 "Edit section: How to install the whole KDE suite system-wide")] How to install the whole KDE suite system-wide 56 | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 57 | 58 | Proceed from point \#2 in the previous steps and also: 59 | 60 | *4. Either find or create a `environment.systemPackages` entry, like 61 | so:* 62 | 63 | environment.systempackages = { 64 | 65 | } 66 | 67 | *5. Add the bulk of the KDE packages (github listing: 68 | `nixpkgs/pkgs/desktops/kde-4.12`) in place to call all dependencies or 69 | copy paste this list in to the environment.systemPackages entry:* 70 | 71 | ` ` 72 | 73 | # KDE packages 74 | pkgs.kde4.kdemultimedia pkgs.kde4.kdegraphics pkgs.kde4.kdeutils pkgs.kde4.applications pkgs.kde4.kdegames pkgs.kde4.kdeedu pkgs.kde4.kdebindings pkgs.kde4.kdeaccessibility pkgs.kde4.kde_baseapps pkgs.kde4.kactivities pkgs.kde4.kdeadmin pkgs.kde4.kdeartwork pkgs.kde4.kde_base_artwork pkgs.kde4.kdenetwork pkgs.kde4.kdepim pkgs.kde4.kdepimlibs pkgs.kde4.kdeplasma_addons pkgs.kde4.kdesdk pkgs.kde4.kdetoys pkgs.kde4.kde_wallpapers pkgs.kde4.kdewebdev pkgs.kde4.oxygen_icons pkgs.kde4.kdebase_workspace pkgs.kde4.kdelibs pkgs.kde4.kdevelop pkgs.kde4.kdevplatform 75 | 76 | 77 | --------------------------------------------------------------------------------