website/content/posts/2023-03-24-managing-mutable-files-in-nixos/assets/runcommandlocal.nix

14 lines
362 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
path = lib.escapeShellArg "/etc/dotfiles";
dotfiles = pkgs.runCommandLocal "nixos-mutable-file-${builtins.baseNameOf path}" { } ''ln -s ${path} $out'';
in
{
enviroment.etc = {
"i3".source = "${dotfiles}/i3";
"polybar".source = "${dotfiles}/polybar";
"zathurarc".source = "${dotfiles}/zathura/zathurarc";
};
}