chore: remove hardcoded nix version

This commit is contained in:
Julien Malka 2024-05-01 19:10:29 +02:00
parent 864b572dbf
commit 517890762b
Signed by: Luj
GPG key ID: 6FC74C847011FD83

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, inputs, ... }: {
config,
lib,
inputs,
...
}:
let let
cfg = config.luj.nix; cfg = config.luj.nix;
in in
@ -8,11 +13,10 @@ with lib;
enable = mkEnableOption "Enable nix experimental"; enable = mkEnableOption "Enable nix experimental";
}; };
config = mkIf cfg.enable config = mkIf cfg.enable {
{
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
package = pkgs.unstable.nix; #package = pkgs.unstable.nix;
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
@ -20,20 +24,15 @@ with lib;
"nixpkgs=${inputs.nixpkgs}" "nixpkgs=${inputs.nixpkgs}"
"nixos=${inputs.nixpkgs}" "nixos=${inputs.nixpkgs}"
]; ];
settings = settings = {
{
builders-use-substitutes = true; builders-use-substitutes = true;
auto-optimise-store = true; auto-optimise-store = true;
substituters = [ substituters = [
"https://cache.nixos.org" "https://cache.nixos.org"
"https://cache.saumon.network/attic-exec?priority=100" "https://cache.saumon.network/attic-exec?priority=100"
]; ];
trusted-public-keys = [ trusted-public-keys = [ "attic-exec:W1PQ0txRf4qpCIlNLscD/Xw1GwGoBij73JSum/I8Xt4=" ];
"attic-exec:W1PQ0txRf4qpCIlNLscD/Xw1GwGoBij73JSum/I8Xt4="
];
}; };
}; };
}; };
} }