nixcache: only enable on moby
it's annoying to rebuild on desko/lappy, and have that fail when servo is offline/unreachable. and it's really silly to have servo use its own cache *over the network*. long-term would be better to do properly distributed builds instead of the cache.
This commit is contained in:
parent
9cce427ea4
commit
fd48880a0a
|
@ -32,6 +32,7 @@
|
||||||
# pkgs.alacritty # terminal; crashes phosh
|
# pkgs.alacritty # terminal; crashes phosh
|
||||||
];
|
];
|
||||||
|
|
||||||
|
colinsane.nixcache.enable = true;
|
||||||
colinsane.gui.phosh.enable = true;
|
colinsane.gui.phosh.enable = true;
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
mobile.bootloader.enable = false;
|
mobile.bootloader.enable = false;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
./hardware
|
./hardware
|
||||||
./image.nix
|
./image.nix
|
||||||
./impermanence.nix
|
./impermanence.nix
|
||||||
|
./nix.nix
|
||||||
./services/duplicity.nix
|
./services/duplicity.nix
|
||||||
./universal
|
./universal
|
||||||
];
|
];
|
||||||
|
|
34
modules/nix.nix
Normal file
34
modules/nix.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.colinsane.nixcache;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
colinsane.nixcache.enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# use our own binary cache
|
||||||
|
nix.settings = mkIf cfg.enable {
|
||||||
|
substituters = [
|
||||||
|
"https://nixcache.uninsane.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.nixos.org/"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nixcache.uninsane.org:r3WILM6+QrkmsLgqVQcEdibFD7Q/4gyzD9dGT33GP70="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# allow `nix flake ...` command
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,7 +4,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./fs.nix
|
./fs.nix
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
./nix.nix
|
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
./vpn.nix
|
./vpn.nix
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# use our own binary cache
|
|
||||||
nix.settings = {
|
|
||||||
substituters = [
|
|
||||||
"https://nixcache.uninsane.org"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://cache.nixos.org/"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nixcache.uninsane.org:r3WILM6+QrkmsLgqVQcEdibFD7Q/4gyzD9dGT33GP70="
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# allow `nix flake ...` command
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user