Skip to content

Instantly share code, notes, and snippets.

@jeaye
Created November 18, 2017 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeaye/775b1dca7c71b730504e959a5b497aa5 to your computer and use it in GitHub Desktop.
Save jeaye/775b1dca7c71b730504e959a5b497aa5 to your computer and use it in GitHub Desktop.
{ stdenv, pkgs }:
stdenv.mkDerivation rec
{
name = "jeaye-dotfiles";
src = ../data/dotfiles;
installPhase =
''
out_jeaye=$out/etc/user/jeaye
mkdir -p "$out_jeaye"
for target in $src/*;
do
base=$(basename "$target")
if [ -d "$target" ];
then
install -v -m 0555 -d "$target" "$out_jeaye/.$base"
else
install -v -m 0444 "$target" "$out_jeaye/.$base"
fi
done
'';
}
{ config, pkgs, lib, ... }:
{
nixpkgs.config =
{
packageOverrides = pkgs: rec
{
jeaye-dotfiles = pkgs.callPackage ./pkg/dotfiles.nix { };
};
};
environment.systemPackages =
[
pkgs.jeaye-dotfiles
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment