feat: Update to NixOS 18.03

As the subject says ...

This only includes some minor changes in configuration. Most
interestingly several packages that I used to have in this repository
as custom packages are now available in `nixos-unstable`.

Unfortunately they weren't included in NixOS 18.03 though ...

Either way, this is cleaner.
This commit is contained in:
Vincent Ambo 2018-04-04 17:10:12 +02:00
parent 2a6d57e97b
commit 01aed568e5
8 changed files with 8 additions and 159 deletions

View file

@ -67,5 +67,5 @@
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "17.09"; # Did you read the comment?
system.stateVersion = "18.03"; # Did you read the comment?
}

View file

@ -5,20 +5,12 @@
{ config, pkgs, ... }:
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
rust-overlay = import nixpkgs-mozilla/rust-overlay.nix;
in {
# Configure the Nix package manager
nixpkgs = {
overlays = [ rust-overlay ];
config.allowUnfree = true;
config.packageOverrides = oldPkgs: oldPkgs // {
wallpapers = import ./pkgs/wallpapers.nix;
# Remove nix-mode from the Nix package as a workaround for
# https://github.com/NixOS/nixpkgs/issues/36372
nix = oldPkgs.nix.overrideAttrs (oldAttrs: rec {
postInstall = "rm -rf $out/share/emacs";
});
};
};
@ -31,6 +23,7 @@ in {
dnsutils
exa
fd
firefox-bin
fish
gcc
git
@ -40,7 +33,7 @@ in {
gnumake
gnupg
google-cloud-sdk
firefox-bin
gopass
htop
i3lock
iftop
@ -67,6 +60,7 @@ in {
spotify
stdmanpages
tdesktop
terraform_0_10
tig
tmux
tree
@ -87,16 +81,9 @@ in {
# Unstable packages:
unstable.numix-cursor-theme
unstable.kontemplate
# Overlay packages:
(rustChannelOf { date = "2018-01-04"; channel = "stable"; }).rust # Rust 1.23.0
unstable.mq-cli
# Custom packages:
(import pkgs/mq-cli.nix)
(import pkgs/nixfd.nix)
(import pkgs/pulseaudio-ctl.nix)
(import pkgs/stern-bin.nix)
(import pkgs/terraform-bin.nix)
(import pkgs/gopass-bin.nix { inherit pkgs; })
];
}

View file

@ -1,25 +0,0 @@
{ pkgs ? import <nixpkgs> {} }:
with pkgs; stdenv.mkDerivation rec {
name = "gopass-bin-${version}";
version = "1.6.1";
src = fetchzip {
url = "https://github.com/justwatchcom/gopass/releases/download/v${version}/gopass-${version}-linux-386.tar.gz";
sha256 = "06iif74akcfb8n1h3ggig56a8y854p4dc7dpxpdfy6w9ra514phq";
};
phases = "installPhase";
installPhase = ''
mkdir -p $out/bin $out/share/fish/completions
cp $src/fish.completion $out/share/fish/completions/gopass.fish
cp $src/gopass $out/bin/gopass
chmod +x $out/bin/gopass
'';
meta = with stdenv.lib; {
description = "password-store like password manager with team functionality";
license = licenses.mit;
homepage = "https://github.com/justwatchcom/gopass";
};
}

View file

@ -1,35 +0,0 @@
# Build and install mq-cli.
with import <nixpkgs> {};
let
# The cached Cargo registry moves *very* slowly, override it:
newRegistry = rustRegistry.overrideAttrs (oldAttrs: rec {
name = "rustRegistry-2017-10-20";
src = fetchFromGitHub {
owner = "rust-lang";
repo = "crates.io-index";
rev = "a1e85af8f57ba61e505c2cb2dc359b66caf355e9";
sha256 = "0xcszw287kqlz15ikflsim36mrvpvlb2y074vg22szz0r48nn06v";
};
});
in rustPlatform.buildRustPackage rec {
name = "mqcli-${version}";
version = "0.1.0";
rustRegistry = newRegistry;
depsSha256 = "138a4dgwhf78bnmxz2ibxqz1wifq5046czxd0w8a4gwngy2ryiqs";
src = fetchFromGitHub {
owner = "aprilabank";
repo = "mq-cli";
rev = "d908fe1cbc7de0bff7cadbe0b3851d50229b7de2";
sha256 = "0c4myav65dzks53q4grin9lhcz1jzpddqnihf2h9lm098dhrswkp";
};
meta = with stdenv.lib; {
description = "CLI interface to POSIX message queues";
homepage = https://github.com/aprilabank/mq-cli;
license = licenses.mit;
};
}

View file

@ -1,28 +0,0 @@
with import <nixpkgs> {};
# Build and install my nixfd tool.
with rustPlatform;
buildRustPackage rec {
name = "nixfd-${version}";
version = "0.1.0";
# This hash is of course total bullshit due to the dummy libc dependency
# caused by:
# https://github.com/NixOS/nixpkgs/issues/22737
depsSha256 = "0iihnyq50qbq0fkvcj5jxilcw7d3bwd1x3gwcq0mzrcah23say0j";
src = fetchFromGitHub {
owner = "tazjin";
repo = "nixfd";
rev = "dbadc9ef8486070f26677154fa032a47d732b7a9";
sha256 = "162301lc4znlqbansmaw9sla1rwi2s5nfmhl3z752n6aj2gcvz89";
};
meta = with stdenv.lib; {
description = "Tired of waiting for nix-env -qaP?";
homepage = https://github.com/tazjin/nixfd;
license = licenses.mit;
platforms = platforms.all;
};
}

View file

@ -1,25 +0,0 @@
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "stern-${version}";
version = "1.5.1";
src = fetchurl {
url = "https://github.com/wercker/stern/releases/download/${version}/stern_linux_amd64";
sha256 = "0xjxhgi1mlkbqimf0fk5cxr6lvwxrr2z49bnw4b1vqpd1gdqjyiv";
name = "stern";
};
phases = "installPhase";
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/stern
chmod +x $out/bin/stern
'';
meta = with stdenv.lib; {
description = "Multi pod and container log tailing for Kubernetes";
homepage = "https://github.com/wercker/stern";
};
}

View file

@ -1,26 +0,0 @@
# Package to install a Terraform binary release.
# This is necessary because the Terraform package on Nix does not currently
# build for some reason.
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "terraform-${version}";
version = "0.10.7";
src = fetchzip {
url = "https://releases.hashicorp.com/terraform/0.10.7/terraform_0.10.7_linux_amd64.zip";
sha256 = "189g94bb1d3wxzp720a5vki91czsqmk728469wa1fdkl43cdqd2n";
};
installPhase = ''
mkdir -p $out/bin
mv terraform $out/bin/terraform
'';
meta = with stdenv.lib; {
description = "Terraform is a tool for building, changing, and combining infrastructure safely and efficiently";
homepage = "https://www.terraform.io/";
license = licenses.mpl20;
};
}

View file

@ -5,8 +5,9 @@ stdenv.mkDerivation {
name = "tazjins-wallpapers-1";
src = fetchgit {
url = "https://git.tazj.in/tazjin/wallpapers.git";
rev = "3bce73b605ba5f848cb4e7cc33058a2be3952c68";
url = "https://git.tazj.in/tazjin/wallpapers.git";
rev = "3bce73b605ba5f848cb4e7cc33058a2be3952c68";
sha256 = "1gjlazag7x005sf2bd6a7dw5p9ry5vjgzmvycsyiw3pv9b1gzc0j";
};
installPhase = ''