Skip to content

Instantly share code, notes, and snippets.

@oscarcarlsson
Forked from LnL7/configuration.nix
Created April 9, 2019 13:08
Show Gist options
  • Save oscarcarlsson/3743244abead6f0deae2abcbe0ee881c to your computer and use it in GitHub Desktop.
Save oscarcarlsson/3743244abead6f0deae2abcbe0ee881c to your computer and use it in GitHub Desktop.
NixOS configuration overlays
{ config, pkgs, ... }:
let
# Import unstable channel.
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# sudo nix-channel --update nixpkgs-unstable
unstable = import <nixpkgs-unstable> {};
in
{
environment.systemPackages =
[ pkgs.hello # regular channel
unstable.spotify # newer version from nixpkgs-unstable
];
virtualisation.libvirtd.enable = true;
nixpkgs.overlays =
[ (self: super:
{
# override with newer version from nixpkgs-unstable
qemu = unstable.qemu;
# custom package that depends on hello from nixpkgs-unstable
foo = super.callPackage ./pkgs/foo { inherit (unstable) hello; };
})
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment