From 517890762b1bcd63da17f8fa73a0af6d45c8977f Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Wed, 1 May 2024 19:10:29 +0200 Subject: [PATCH] chore: remove hardcoded nix version --- modules/nix/default.nix | 51 ++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 2aa708e..87898a5 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -1,4 +1,9 @@ -{ pkgs, config, lib, inputs, ... }: +{ + config, + lib, + inputs, + ... +}: let cfg = config.luj.nix; in @@ -8,32 +13,26 @@ with lib; enable = mkEnableOption "Enable nix experimental"; }; - config = mkIf cfg.enable - { - nixpkgs.config.allowUnfree = true; - nix = { - package = pkgs.unstable.nix; - extraOptions = '' - experimental-features = nix-command flakes - ''; - nixPath = [ - "nixpkgs=${inputs.nixpkgs}" - "nixos=${inputs.nixpkgs}" + config = mkIf cfg.enable { + nixpkgs.config.allowUnfree = true; + nix = { + #package = pkgs.unstable.nix; + extraOptions = '' + experimental-features = nix-command flakes + ''; + nixPath = [ + "nixpkgs=${inputs.nixpkgs}" + "nixos=${inputs.nixpkgs}" + ]; + settings = { + builders-use-substitutes = true; + auto-optimise-store = true; + substituters = [ + "https://cache.nixos.org" + "https://cache.saumon.network/attic-exec?priority=100" ]; - settings = - { - builders-use-substitutes = true; - auto-optimise-store = true; - substituters = [ - "https://cache.nixos.org" - "https://cache.saumon.network/attic-exec?priority=100" - ]; - trusted-public-keys = [ - "attic-exec:W1PQ0txRf4qpCIlNLscD/Xw1GwGoBij73JSum/I8Xt4=" - ]; - }; - + trusted-public-keys = [ "attic-exec:W1PQ0txRf4qpCIlNLscD/Xw1GwGoBij73JSum/I8Xt4=" ]; }; - }; + }; }