snowfield/modules/nix/default.nix

36 lines
767 B
Nix
Raw Normal View History

2024-05-01 19:10:29 +02:00
{
config,
lib,
2024-06-25 10:12:15 +02:00
pkgs,
2024-05-01 19:10:29 +02:00
...
}:
2021-12-11 13:36:08 +01:00
let
cfg = config.luj.nix;
in
with lib;
{
options.luj.nix = {
enable = mkEnableOption "Enable nix experimental";
};
2024-05-01 19:10:29 +02:00
config = mkIf cfg.enable {
nixpkgs.config.allowUnfree = true;
nix = {
2024-06-25 10:12:15 +02:00
package = pkgs.unstable.lix;
2024-05-01 19:10:29 +02:00
extraOptions = ''
experimental-features = nix-command flakes
'';
nixPath = [
"nixpkgs=${config.machine.meta.nixpkgs_version}"
"nixos=${config.machine.meta.nixpkgs_version}"
2024-05-01 19:10:29 +02:00
];
settings = {
builders-use-substitutes = true;
auto-optimise-store = true;
2024-08-03 10:58:23 +02:00
substituters = [ "https://cache.nixos.org" ];
2024-05-01 19:10:29 +02:00
trusted-public-keys = [ "attic-exec:W1PQ0txRf4qpCIlNLscD/Xw1GwGoBij73JSum/I8Xt4=" ];
2021-12-11 13:36:08 +01:00
};
};
2024-05-01 19:10:29 +02:00
};
2021-12-11 13:36:08 +01:00
}