| 22 Feb 2024 |
kraem | In reply to @lillecarl:matrix.org
{ lib
, ...
}:
# $FLAKE should be configured to where your repository is located
# Preferably using direnv, you can also set it into your sessionVariables
let
dot_path = "${builtins.getEnv("FLAKE")}/sub/dir/";
dot_paths = lib.filesystem.listFilesRecursive dot_path;
dot_strings = builtins.map (x: builtins.toString x) dot_paths;
dot_prefixDeleted = builtins.map (x: builtins.replaceStrings [ dot_path ] [ "" ] x) dot_strings;
dotfile_outOfStoreLinked = lib.attrsets.genAttrs dot_prefixDeleted (name: {
source = config.lib.file.mkOutOfStoreSymlink (dot_path + name);
});
in
{
home.file = dotfile_outOfStoreLinked;
}
I know I mentioned linking things from $FLAKE repo into $HOME which I'm quite happy with. This is the implementation I'm using. It'll replicate a tree subdir into $HOME for you, nothing using home.file.x.recursive so you won't get collisions with folders and stuff 😄
ah this was what you were talking about yesterday! i'm gonna try to roll with some variant of this for a while. long time ago any of my systems were impure hehe | 19:05:22 |
kraem | LilleCarl (Salsa9): also did you mean https://github.com/PRQL/prql ? in that case we thought about the same project | 19:06:26 |
lillecarl | In reply to @kraem:ne.bul.ae ah this was what you were talking about yesterday! i'm gonna try to roll with some variant of this for a while. long time ago any of my systems were impure hehe Yeah there's the fileset lib I didn't even know about until i saw "umport" that recursively imports modules 😄 So it can be "nicer" | 19:07:49 |
lillecarl | In reply to @kraem:ne.bul.ae LilleCarl (Salsa9): also did you mean https://github.com/PRQL/prql ? in that case we thought about the same project Yeap, along with for running prql within pg https://github.com/kaspermarstal/plprql | 19:09:19 |
lillecarl | It's early work, but it's nice to see either way. SQL has had it's best days | 19:10:06 |
kraem | yeah i saw that, nice! last time i checked prql i think they were still talking about implementing the postgres layer | 19:10:12 |
kraem | this (https://github.com/neondatabase/neon) is pretty interesting as well, although not the same thing at all. it basically swaps out the storage layer of postgres, making it distributed and the backing storage is s3 :) | 19:24:28 |