From 3f199f96506d2559dd51d8fff629790e057c9149 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 14 Dec 2019 11:44:01 +0000 Subject: chore(nixos): Move NixOS config to infra/nixos --- infra/nixos/dotfiles.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 infra/nixos/dotfiles.nix (limited to 'infra/nixos/dotfiles.nix') diff --git a/infra/nixos/dotfiles.nix b/infra/nixos/dotfiles.nix new file mode 100644 index 000000000000..2e952207d47d --- /dev/null +++ b/infra/nixos/dotfiles.nix @@ -0,0 +1,27 @@ +# Bundle configuration files into a derivation. +# I call this derivation dotfiles despite that not technically being true +# anymore ... + +{ config, pkgs, ...}: + +let dotfiles = pkgs.stdenv.mkDerivation { + name = "tazjins-dotfiles"; + + srcs = [ + ./dotfiles + ]; + + installPhase = '' + mkdir -p $out + cp ./* $out/ + ''; +}; +in { + # /etc/ is a special place in NixOS! + # Symlinks that need to be created there must be specified explicitly. + environment.etc = { + "alacritty.yml".source = "${dotfiles}/alacritty.yml"; + "fish/config.fish".source = "${dotfiles}/config.fish"; + "tmux.conf".source = "${dotfiles}/tmux.conf"; + }; +} -- cgit 1.4.1