···3 # keep-sorted start
4 ./formatter.nix # formatter for nix fmt, via treefmt is a formatter for every language
5 ./shell.nix # a dev shell that provieds all that you will need to work
6- ./topology # generate a image of the flakes topology
7 # keep-sorted end
8 ];
9}
···3 # keep-sorted start
4 ./formatter.nix # formatter for nix fmt, via treefmt is a formatter for every language
5 ./shell.nix # a dev shell that provieds all that you will need to work
06 # keep-sorted end
7 ];
8}
···1{
2- lib,
3- config,
4- options,
5- modulesPath,
6- ...
7-}:
8-let
9- lixModuleMerged = lib.pathExists "${modulesPath}/programs/lix.nix";
10- nixDaemonCfg = config.systemd.services.nix-daemon;
11-in
12-{
13- config = lib.mkMerge [
14- {
15- nix = {
16- # set the nix store to clean every Monday at 3am
17- gc.dates = "Mon *-*-* 03:00";
1819- # automatically optimize /nix/store by removing hard links
20- optimise = {
21- automatic = true;
22- dates = [ "04:00" ];
23- };
2425- # Make builds run with a low priority, keeping the system fast
26- # daemonCPUSchedPolicy = "idle";
27- # daemonIOSchedClass = "idle";
28- # daemonIOSchedPriority = 7;
2930- # set the build dir to /var/tmp to avoid issues on tmpfs
31- # https://github.com/NixOS/nixpkgs/issues/293114#issuecomment-2663470083
32- settings.build-dir = "/var/tmp";
33- };
34- }
35-36- # https://github.com/NixOS/nixpkgs/pull/469067
37- (lib.mkIf (!lixModuleMerged) {
38- systemd.services."nix-daemon@" = {
39- path = lib.subtractLists (options.systemd.services.type.getSubOptions "").path.value nixDaemonCfg.path;
40- environment = lib.filterAttrs (n: _v: n != "PATH") nixDaemonCfg.environment;
41- inherit (nixDaemonCfg) serviceConfig unitConfig;
42- stopIfChanged = false;
43- restartIfChanged = false;
44- };
45-46- # stc can't restart socket units. it can only reload them, but reloading sockets is in invalid operation!
47- systemd.services.lix-daemon-socket-permissions = {
48- overrideStrategy = "asDropin";
49- inherit (nixDaemonCfg) restartTriggers;
50- stopIfChanged = false;
51- };
52- })
53- ];
54}
···1{
2+ nix = {
3+ # set the nix store to clean every Monday at 3am
4+ gc.dates = "Mon *-*-* 03:00";
000000000000056+ # automatically optimize /nix/store by removing hard links
7+ optimise = {
8+ automatic = true;
9+ dates = [ "04:00" ];
10+ };
1112+ # Make builds run with a low priority, keeping the system fast
13+ # daemonCPUSchedPolicy = "idle";
14+ # daemonIOSchedClass = "idle";
15+ # daemonIOSchedPriority = 7;
1617+ # set the build dir to /var/tmp to avoid issues on tmpfs
18+ # https://github.com/NixOS/nixpkgs/issues/293114#issuecomment-2663470083
19+ settings.build-dir = "/var/tmp";
20+ };
0000000000000000000021}
···1+# stop forgetting how to do this smh
2+# <https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/do-more-with-tunnels/local-management/create-local-tunnel/>
3{
4 lib,
5 self,