make it so servo doesn't do binfmt emulation, nor fetch cache from desko
This commit is contained in:
parent
39eb1e3d07
commit
8fc57c4249
|
@ -4,7 +4,7 @@
|
|||
./fs.nix
|
||||
];
|
||||
|
||||
sane.roles.build-machine = true;
|
||||
sane.roles.build-machine.enable = true;
|
||||
sane.roles.client = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."desko".wg-home.ip;
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
signaldctl.enableFor.user.colin = true;
|
||||
};
|
||||
|
||||
sane.roles.build-machine = true;
|
||||
sane.roles.build-machine.enable = true;
|
||||
sane.roles.build-machine.emulation = false;
|
||||
sane.zsh.showDeadlines = false; # ~/knowledge doesn't always exist
|
||||
sane.services.dyn-dns.enable = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
|
|
|
@ -28,8 +28,9 @@ in
|
|||
sane.nixcache.substituters = mkOption {
|
||||
type = types.listOf types.string;
|
||||
default =
|
||||
# TODO: make these blacklisted entries injectable
|
||||
(lib.optional (hostName != "servo") "https://nixcache.uninsane.org")
|
||||
++ (lib.optional (hostName != "desko") "http://desko:5000")
|
||||
++ (lib.optional (hostName != "servo" && hostName != "desko") "http://desko:5000")
|
||||
++ [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
|
|
|
@ -3,11 +3,18 @@
|
|||
let
|
||||
inherit (lib) mkIf mkMerge mkOption types;
|
||||
inherit (config.programs.ccache) cacheDir;
|
||||
cfg = config.sane.roles.build-machine;
|
||||
in
|
||||
{
|
||||
options.sane.roles.build-machine = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
options.sane.roles.build-machine = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
emulation = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
|
@ -30,13 +37,13 @@ in
|
|||
# })
|
||||
# ];
|
||||
}
|
||||
(mkIf config.sane.roles.build-machine {
|
||||
(mkIf cfg.enable {
|
||||
# serve packages to other machines that ask for them
|
||||
sane.services.nixserve.enable = true;
|
||||
|
||||
# enable cross compilation
|
||||
# TODO: do this via stdenv injection, linking into /run/binfmt the stuff in <nixpkgs:nixos/modules/system/boot/binfmt.nix>
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
boot.binfmt.emulatedSystems = lib.optional cfg.emulation [ "aarch64-linux" ];
|
||||
# corresponds to env var: NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
|
||||
# nixpkgs.config.allowUnsupportedSystem = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user