| 26 Dec 2021 |
balsoft | In reply to @withoutwithin:matrix.org I'm trying to flakify an app of mine and it's not working: https://tulpa.dev/cadey/printerfacts/src/branch/main/flake.nix i tried to define the nixos module and the tests inside the flake.nix file. but the test is claiming that the service can't cd into the package on disk. here is the test output: http://ix.io/3JAp. what am i doing wrong? You don't need to filter out target since it's gitignored already | 18:18:37 |
balsoft | Also, you're trying to chdir to /srv/within, but the service creating those directories may not have started at that point | 18:20:41 |
balsoft | Also, it's better to use systemd's internal mechanisms for this I think | 18:20:51 |
balsoft | Try `StateDirectory`` | 18:20:56 |
balsoft | * Try StateDirectory | 18:20:58 |
balsoft | * Try StateDirectory | 18:21:00 |
balsoft | (and it's also going to put it in the right place, i.e. /var/lib | 18:21:26 |
balsoft | * (and it's also going to put it in the right place, i.e. /var/lib) | 18:21:28 |
balsoft | Oh, it looks like RuntimeDirectory may be a better fit here | 18:21:47 |
balsoft | And if you're adamant on creating a non-standard directory in the root (which I think is a bad idea), do it with systemd.tmpfiles.rules instead of custom things | 18:22:14 |
balsoft | Or, if you just want to fix what you have, add before = [ "within.printerfacts.service" ]; to within-homedir-setup | 18:22:57 |
Xe | is there a way to make systemd.tmpfiles.rules create permanent persistent directories? | 18:24:22 |
Xe | i thought that would create time bombs that would vanish randomly | 18:24:35 |
Xe | * i thought that would create time bombs that could vanish randomly | 18:27:22 |
balsoft | tmpfiles create persistent directories | 18:27:39 |
balsoft | (unless you use d, D or e, that is) | 18:29:03 |
balsoft | * (unless you use d, D or e, that is, and specify the cleanup-age) | 18:29:47 |
Xe | i see, thanks | 18:53:19 |
Xe | but yeah i was just doing things really wrongly with how i was copying things into my flake.nix | 18:53:36 |
Xe |  Download Screenshot from 2021-12-26 13-53-12.png | 18:53:50 |
Xe | it works now 😀 | 18:53:54 |
| 28 Dec 2021 |
ilkecan | In reply to @andi:kack.it So, how do I write a flake that doesn't rebuild all the packages that have their source in the same repo (root) whenever I change a whitespace in my flake.nix? Is filterSource compatible/supported with flakes? You need to use nix-filter or something equivalent. | 18:57:38 |
andi- | I wrote a filter expression that only accepted a single file. It still copied everything in the store. | 18:58:26 |
ilkecan | In reply to @flyx:flyx.org hi folks! how can I prevent every edit of flake.nix to cause everything depending on self being rebuilt on the next nix build? flake.nix is checked into git so it is part of self, but obviously not part of the sources being built, so an edit should only affect those derivations whose definitions were changed by the edit please see the message above | 18:58:27 |
ilkecan | In reply to @andi:kack.it I wrote a filter expression that only accepted a single file. It still copied everything in the store. The repo is copied to the Nix store before each evaluation but using nix-filter should prevent unnecessary rebuilds. | 18:59:57 |
andi- | yeah but the former is the issue I am trying to avoid. | 19:00:14 |
andi- | No point in copying everythin ginto the repo for just a few files.. | 19:00:22 |
ilkecan | You didn't say that in you original message. You asked how to write a flake that doesn't rebuild all packages not how to prevent Nix copying the full repo to the store. | 19:02:15 |
| 29 Dec 2021 |
| putchar joined the room. | 12:46:08 |
| v0|d joined the room. | 18:19:47 |