From b42fae82dc6eac9f046c077e9e9339e09182bc37 Mon Sep 17 00:00:00 2001 From: Jimbo Date: Tue, 3 Sep 2024 01:25:38 -0400 Subject: [PATCH] Don't be stupid with syntaxing --- nixos/base.nix | 8 +++++--- nixos/modules/legacy.nix | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/base.nix b/nixos/base.nix index aaecff2..1e22414 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -24,6 +24,10 @@ }; }; + # This will add each flake input as a registry + # To make nix commands consistent with your flake + nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); + # Enable flakes and garbage collection nix = { settings = { @@ -35,10 +39,8 @@ gc = { automatic = true; dates = "weekly"; - options = "--delete-older-than 1w" + options = "--delete-older-than 1w"; }; - # You can also manually optimize the store via nix-store --optimise - settings.auto-optimise-store = true; }; # Set timezone diff --git a/nixos/modules/legacy.nix b/nixos/modules/legacy.nix index e66cfa8..98f1105 100644 --- a/nixos/modules/legacy.nix +++ b/nixos/modules/legacy.nix @@ -1,4 +1,4 @@ -{ +{config, inputs, lib, ...}: { # This will add each flake input as a registry # To make nix commands consistent with your flake nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);