Skip to main content
    • Aa
    • Aa

NixOS: A purely functional Linux distribution


Existing package and system configuration management tools suffer from an imperative model, where system administration actions such as package upgrades or changes to system configuration files are stateful: they destructively update the state of the system. This leads to many problems, such as the inability to roll back changes easily, to deploy multiple versions of a package side-by-side, to reproduce a configuration deterministically on another machine, or to reliably upgrade a system. In this paper we show that we can overcome these problems by moving to a purely functional system configuration model. This means that all static parts of a system (such as software packages, configuration files and system startup scripts) are built by pure functions and are immutable, stored in a way analogous to a heap in a purely functional language. We have implemented this model in NixOS, a non-trivial Linux distribution that uses the Nix package manager to build the entire system configuration from a modular, purely functional specification.

Linked references
Hide All

This list contains references from the content that can be linked to their source. For a full set of references and notes please see the PDF or HTML where available.

Clifford Beshers , David Fox , & Jeremy Shaw . (2007). Experience report: using functional programming to manage a Linux distribution. In ICFP'07: Proceedings of the 2007 ACM SIGPLAN International Conference on Functional Programming, R. Hinze and N. Ramsey (eds.), New York, NY, USA: ACM, pp. 213218.

R. D. Cosmo , S. Zacchiroli & P. Trezentos (2008) Package upgrades in FOSS distributions: details and challenges. In HotSWUp '08: Proceedings of the 1st International Workshop on Hot Topics in Software Upgrades. New York, NY, USA: ACM, pp. 15.

E. Dolstra , E. Visser & M. de Jonge (2004) Imposing a memory management discipline on software deployment. In Proceedings of the 26th International Conference on Software Engineering (ICSE 2004). IEEE Computer Society, pp. 583592.

T. Hallgren , M. P. Jones , R. Leslie & A. Tolmach (2005) A principled approach to operating system construction in Haskell. In ICFP '05: Tenth ACM SIGPLAN International Conference on Functional Programming. ACM, pp. 116128.

Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Full text views

Total number of HTML views: 0
Total number of PDF views: 11 *
Loading metrics...

Abstract views

Total abstract views: 115 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 20th September 2017. This data will be updated every 24 hours.