test building optimized packages
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
{ lib, inputs, config, pkgsVersion, ... }:
|
||||
with lib;
|
||||
let cfg = config.custom.nix.settings;
|
||||
let
|
||||
cfg = config.custom.nix.settings;
|
||||
cache = "https://cache.nixos.org";
|
||||
in {
|
||||
options.custom.nix.settings = {
|
||||
enable = mkEnableOption "Enables various nix settings";
|
||||
@@ -18,6 +20,11 @@ in {
|
||||
nix = {
|
||||
optimise.automatic = cfg.optimise;
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
settings.substituters =
|
||||
lib.mkIf (config.networking.hostName == "kop-pc")
|
||||
[ "http://192.168.0.20:5000" ];
|
||||
settings.trusted-public-keys =
|
||||
[ "amd-server:r5S7vv/3sZ0knhMvpUzRHXFlBHgov2tLhtoKqLXYf28=" ];
|
||||
registry.nixpkgs.flake = pkgsVersion;
|
||||
gc = {
|
||||
automatic = true;
|
||||
|
||||
18
modules/services/nix-cache.nix
Normal file
18
modules/services/nix-cache.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ config, ... }: {
|
||||
|
||||
age.secrets.binary-cache = {
|
||||
file = ../../secrets/binary-cache.age;
|
||||
};
|
||||
nix.sshServe = {
|
||||
enable = true;
|
||||
keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeP6qtVqE/gu72ZUZE8cdRi3INiUW9NqDR7SjXIzTw2 kopatz"
|
||||
];
|
||||
};
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
port = 5000;
|
||||
secretKeyFile = config.age.secrets.binary-cache.path;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user