Skip to content
My nix stuff
Branch: master
Clone or download
Latest commit 68f0dd0 May 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aws
kube NixOps testing May 4, 2019
mts-openstack Refactor the openstack stuff May 3, 2019
nixops ... May 4, 2019
nixos Fix NixOS settings May 4, 2019
openstack Refactor the openstack stuff May 3, 2019
rtop-openstack
.editorconfig First version of my lame nixos config Apr 25, 2019
.gitignore NixOps testing May 4, 2019
.travis.yml Fix Apr 27, 2019
LICENSE Initial commit Apr 17, 2019
README.md Reading about NixOS modules made me refactor the kubenix demo May 2, 2019
config.nix Initial commit Apr 17, 2019
fromBase64.nix Initial commit Apr 17, 2019
overlays.nix NixOps testing May 4, 2019
squid.conf.example Initial commit Apr 17, 2019

README.md

Nix related stuff

Build Status

I'm playing around with Nix and recently NixOS, here will be the public part of my configurations and other toy examples on my path towards learning Nix.

Disclaimer

WARNING: the code here is crap :) Follow it if you want to learn.

Installing Nix

Can be done as simple as:

curl https://nixos.org/nix/install | sh

Bootstrap multiuser:

curl https://nixos.org/nix/install -o install
sh ./install --daemon

Using Nix as a package manager

I found using Nix as a package manager is the best entry drug to the shiny NixOS world. It even works on MacOS.

Update channel:

nix-channel --update

Search and install package:

nix-enq -qaP | grep go
nix-env -iA nixpkgs.go

Update all packages:

nix-enq -u

Getting started

NixPills is a great resource to learn. As you can see this stuff is also inspired by Sam's blog post series too.

Motivation

Domen Kožar in his blog post can explain better than me why Nix is the way to go.

I've been using Puppet or as I call it the PHP of configuration management since version 2 :) It always becomes a tangled mess eventhough I've been trying to follow role/profile/module pattern. A strong functional language has a steep learning curve, but I believe in the long term the simple composability pays off.

TODO

Testing is currently done like in this suggestion https://github.com/NixOS/nixpkgs/issues/25264 and only with nix-instantiate, perhaps we need to change that?

Try nix-darwin and home-manager

CI

GitLab

target:
  image: nixos/nix
  variables:
    NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.09.tar.gz"
  script:
    - nix-build ...

Travis

language: nix
env:
  - NIX_PATH="nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.09.tar.gz"
You can’t perform that action at this time.