Skip to content

Commit

Permalink
laptop.base: add mgit.skipNixCache
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Jun 25, 2024
1 parent 5e0c9fd commit ebce6e5
Showing 1 changed file with 33 additions and 16 deletions.
49 changes: 33 additions & 16 deletions modules/laptop/base.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
{ config, pkgs, lib, ... }: with lib; {
nix = {
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "@wheel" ];
options = {
mgit = {
skipNixCache = mkEnableOption "skipping the nix-internal cache when checking the cache";
};
package = pkgs.nixVersions.latest;
};

programs.git = {
enable = true;
lfs.enable = true;
};
config = mkMerge [
{
nix = {
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "@wheel" ];
};
package = pkgs.nixVersions.latest;
};

virtualisation.docker = {
enable = true;
# save resources
enableOnBoot = false;
# this causes problems on shutdown
liveRestore = false;
};
programs.git = {
enable = true;
lfs.enable = true;
};

virtualisation.docker = {
enable = true;
# save resources
enableOnBoot = false;
# this causes problems on shutdown
liveRestore = false;
};
}
(mkIf (config.mgit.skipNixCache) {
nix.settings = {
# Disable cache
narinfo-cache-positive-ttl = 0;
narinfo-cache-negative-ttl = 0;
};
})
];
}

0 comments on commit ebce6e5

Please sign in to comment.