skip to main content
10.1145/1411204.1411255acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

NixOS: a purely functional Linux distribution

Published: 20 September 2008 Publication History

Abstract

Existing package and system configuration management tools suffer from an imperative model, where system administration actions such as upgrading packages 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 run 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 analogously to a heap in a purely function 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 purely functional specification.

Supplementary Material

JPG File (1411255.jpg)
index.html (index.html)
Slides from the presentation
ZIP File (p367-slides.zip)
Supplemental material for: NixOS: a purely functional Linux distribution
Audio only (1411255.mp3)
Video (1411255.mp4)

References

[1]
Rick Anderson. The end of DLL hell. MSDN, http://msdn2.microsoft.com/en-us/library/ms811694.aspx, January 2000.
[2]
Clifford Beshers, David Fox, and Jeremy Shaw. Experience report: using functional programming to manage a Linux distribution. In ICFP'07: Proc. 2007 ACM SIGPLAN Intl. Conf. on Functional Programming, pages 213-218, New York, NY, USA, 2007. ACM.
[3]
Hans-Juergen Boehm. Space efficient conservative garbage collection. In Proceedings of the ACM SIGPLAN '93 Conference on Programming Language Design and Implementation, number 28/6 in SIGPLAN Notices, pages 197--206, June 1993.
[4]
Mark Burgess. Cfengine: a site configuration engine. Computing Systems, 8 (3), 1995.
[5]
Geoffrey Clemm. The Odin System -- An Object Manager for Extensible Software Environments. D thesis, University of Colorado at Boulder, February 1986.
[6]
John DeTreville. Making system configuration more declarative. In HotOS X: 10th Workshop on Hot Topics in Operating Systems. USENIX, 2005.
[7]
Eelco Dolstra. Secure sharing between untrusted users in a transparent source/binary deployment model. In 20th IEEE/ACM Intl. Conf. on Automated Software Engineering (ASE 2005), pages 154--163, Long Beach, California, USA, November 2005.
[8]
Eelco Dolstra. The Purely Functional Software Deployment Model. D thesis, Faculty of Science, Utrecht University, The Netherlands, 2006.
[9]
Eelco Dolstra, Eelco Visser, and Merijn de Jonge. Imposing a memory management discipline on software deployment. In Proc. 26th Intl. Conf. on Software Engineering (ICSE 2004), pages 583--592. IEEE Computer Society, May 2004.
[10]
Stuart I. Feldman. Make-a program for maintaining computer programs. Software-Practice and Experience, 9 (4): 255--65, 1979.
[11]
Eric Foster-Johnson. Red Hat RPM Guide. John Wiley & Sons, 2003. Also at http://fedora.redhat.com/docs/drafts/rpm-guide-en/.
[12]
Thomas Hallgren, Mark P. Jones, Rebekah Leslie, and Andrew Tolmach. A principled approach to operating system construction in Haskell. In ICFP '05: Tenth ACM SIGPLAN Intl. Conf. on Functional Programming, pages 116--128. ACM Press, 2005.
[13]
Paul Hudak. Conception, evolution, and application of functional programming languages. ACM Computing Surveys, 21 (3): 359--411, 1989.
[14]
Anthony M. Sloane. Post-design domain-specific language embedding: A case study in the software engineering domain. In Proceedings of the 35th Annual Hawaii International Conference on System Sciences (HICSS'02), Washington, DC, USA, 2002. IEEE Computer Society.
[15]
TIS Committee. Tool Interface Specification (TIS) Executable and Linking Format (ELF) Specification, Version 1.2, May 1995.
[16]
David B. Tucker and Shriram Krishnamurthi. Applying module system research to package management. In Tenth International Workshop on Software Configuration Management (SCM-10), 2001.

Cited By

View all
  • (2024)Providing a Flexible and Comprehensive Software Stack Via Spack, an Extreme-Scale Scientific Software Stack, and Software Development KitsComputing in Science and Engineering10.1109/MCSE.2024.339501626:1(20-30)Online publication date: 1-Jan-2024
  • (2024)Reinforcement Learning-based Performance-aware Energy Management in 5G Base Stations2024 16th International Conference on COMmunication Systems & NETworkS (COMSNETS)10.1109/COMSNETS59351.2024.10427091(568-571)Online publication date: 3-Jan-2024
  • (2023)reUpNix: Reconfigurable and Updateable Embedded SystemsProceedings of the 24th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3589610.3596273(40-51)Online publication date: 13-Jun-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '08: Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
September 2008
422 pages
ISBN:9781595939197
DOI:10.1145/1411204
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 43, Issue 9
    ICFP '08
    September 2008
    399 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1411203
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 20 September 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. NixOS
  2. nix
  3. package management
  4. purely functional deployment model
  5. purely functional language
  6. software deployment
  7. system configuration management

Qualifiers

  • Research-article

Conference

ICFP08
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)128
  • Downloads (Last 6 weeks)13
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Providing a Flexible and Comprehensive Software Stack Via Spack, an Extreme-Scale Scientific Software Stack, and Software Development KitsComputing in Science and Engineering10.1109/MCSE.2024.339501626:1(20-30)Online publication date: 1-Jan-2024
  • (2024)Reinforcement Learning-based Performance-aware Energy Management in 5G Base Stations2024 16th International Conference on COMmunication Systems & NETworkS (COMSNETS)10.1109/COMSNETS59351.2024.10427091(568-571)Online publication date: 3-Jan-2024
  • (2023)reUpNix: Reconfigurable and Updateable Embedded SystemsProceedings of the 24th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3589610.3596273(40-51)Online publication date: 13-Jun-2023
  • (2023)A Reinforcement Learning Approach for Performance-aware Reduction in Power Consumption of Data Center Compute Nodes2023 IEEE International Conference on Cloud Engineering (IC2E)10.1109/IC2E59103.2023.00022(121-130)Online publication date: 25-Sep-2023
  • (2022)Using answer set programming for HPC dependency solvingProceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis10.5555/3571885.3571931(1-15)Online publication date: 13-Nov-2022
  • (2022)Mapping out the HPC dependency chaosProceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis10.5555/3571885.3571930(1-12)Online publication date: 13-Nov-2022
  • (2022)Modus: a Datalog dialect for building container imagesProceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3540250.3549133(595-606)Online publication date: 7-Nov-2022
  • (2022)Using Answer Set Programming for HPC Dependency SolvingSC22: International Conference for High Performance Computing, Networking, Storage and Analysis10.1109/SC41404.2022.00040(1-15)Online publication date: Nov-2022
  • (2022)Mapping Out the HPC Dependency ChaosSC22: International Conference for High Performance Computing, Networking, Storage and Analysis10.1109/SC41404.2022.00039(1-12)Online publication date: Nov-2022
  • (2022)SpackNVD: A Vulnerability Audit Tool for Spack Packages2022 IEEE/ACM First International Workshop on Cyber Security in High Performance Computing (S-HPC)10.1109/S-HPC56715.2022.00007(9-17)Online publication date: Nov-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media