Coder Social home page Coder Social logo

nixos-config's Introduction

NixOs Configuration files

To apply a configuration for a particular host, e.g meshify:

sudo nixos-rebuild switch --flake .#meshify

Replace meshify with the desired host, found in hosts.

Using modules

If you want to use for example the monero.nix module in your NixOs base system, then copy modules/monero.nix into /etc/nixos/modules/monero.nix (make sure to create the modules directory in /etc/nixos). Then modify your /etc/nixos/configuration.nix file to include the module as such:

imports = [
  # Include the results of the hardware scan.
  ./hardware-configuration.nix
  ./../../modules/monero.nix
];

Now rebuild as such:

sudo nixos-rebuild switch

Updating

See the metadata and the current flake inputs:

nix flake metadata .

There one can see the Inputs.

To update the flake input nixpkgs:

nix flake lock --update-input nixpkgs

Then update the system, eg for the meshify host configuration:

sudo nixos-rebuild switch --flake .#meshify --upgrade-all

Cleaning system store manually

nix-store --gc

Tips:

When getting something like this:

  error: cached failure of attribute 'nixosConfigurations.poweredge.config.system.build.toplevel'

Then you can disable the eval-cache temporarily by running with --option eval-cache false.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.