Browse Source

Add WIP nixos config

main
parent
commit
47dc5d7cd8
  1. 22
      flake.nix
  2. 18
      hosts/nixos/configuration.nix
  3. 27
      modules/nix.org

22
flake.nix

@ -0,0 +1,22 @@
{
description = "Immutable NixOS dotfiles.";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "nixpgs/master";
emacs-overlay.url = "github:nix-comunity/emacs-overlay";
nixos-hardwre.url = "github:nixos/nixos-hardware";
};
outputs = inputs @ { self, nixpkgs, ... }: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/nixos/configuration.nix
./hosts/nixos/hardware.nix
./config/cachix.nix
];
};
};
}

18
hosts/nixos/configuration.nix

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
nixpkgs = {
config = { allowUnfree = true; };
overlays = [ ];
};
# ...
}

27
modules/nix.org

@ -0,0 +1,27 @@
#+TITLE: Nix
#+AUTHOR: Christopher James Hayward
#+EMAIL: chris@chrishayward.xyz
#+PROPERTY: header-args:emacs-lisp :tangle nix.el :comments org
#+PROPERTY: header-args :results silent :eval no-export :comments org
#+OPTIONS: num:nil toc:nil todo:nil tasks: nil tags:nil
#+OPTIONS: skip:nil author:nil emacs:nil creator:nil timestamp:nil
* Setup
*Nix*[fn:1] is a package manager for Linux that uses functional configuration language to build reproducible package deployments. *NixOS*[fn:2] is an extension of the Nix package manager to the entire operating system.
* Config
Download and install ~nix-mode~ for working with *Nix* language buffers.
#+begin_src emacs-lisp
(use-package nix-mode)
#+end_src
* Footnotes
[fn:1] https://nixos.org
[fn:2] https://nixos.org
Loading…
Cancel
Save