mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01:00
35 lines
767 B
Nix
35 lines
767 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.luj.nix;
|
|
in
|
|
with lib;
|
|
{
|
|
options.luj.nix = {
|
|
enable = mkEnableOption "Enable nix experimental";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
nixpkgs.config.allowUnfree = true;
|
|
nix = {
|
|
package = pkgs.unstable.lix;
|
|
extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
nixPath = [
|
|
"nixpkgs=${config.machine.meta.nixpkgs_version}"
|
|
"nixos=${config.machine.meta.nixpkgs_version}"
|
|
];
|
|
settings = {
|
|
builders-use-substitutes = true;
|
|
auto-optimise-store = true;
|
|
substituters = [ "https://cache.nixos.org" ];
|
|
trusted-public-keys = [ "attic-exec:W1PQ0txRf4qpCIlNLscD/Xw1GwGoBij73JSum/I8Xt4=" ];
|
|
};
|
|
};
|
|
};
|
|
}
|