From aa6bbc2b481a023d8cfe0f0b220a6555fd72f899 Mon Sep 17 00:00:00 2001 From: osbm Date: Thu, 6 Nov 2025 08:48:01 +0300 Subject: [PATCH] lean --- modules/nixos/system/nix-settings.nix | 105 +++++++++++++------------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/modules/nixos/system/nix-settings.nix b/modules/nixos/system/nix-settings.nix index 9eb9f5c..c0a0b0c 100644 --- a/modules/nixos/system/nix-settings.nix +++ b/modules/nixos/system/nix-settings.nix @@ -7,66 +7,65 @@ { config = lib.mkIf config.osbmModules.nixSettings.enable { # Allow unfree packages - nixpkgs.config.allowUnfreePredicate = - pkg: - builtins.elem (lib.getName pkg) [ - "vscode" - "discord" - "obsidian" - "steam" - "steam-unwrapped" - "open-webui" - "vscode-extension-github-copilot" - "spotify" - "cursor" - # NVIDIA related - "libcurand" - "nvidia-x11" - "cuda_cudart" - "cuda_nvcc" - "cuda_cccl" - "libcublas" - "libcusparse" - "libnvjitlink" - "libcufft" - "cudnn" - "cuda_nvrtc" - "libnpp" - "nvidia-settings" - # blender with cuda is not foss?!? - "blender" - - ]; - - nixpkgs.config.allowAliases = false; + nixpkgs = { + config = { + allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "vscode" + "discord" + "obsidian" + "steam" + "steam-unwrapped" + "open-webui" + "vscode-extension-github-copilot" + "spotify" + "cursor" + # NVIDIA related + "libcurand" + "nvidia-x11" + "cuda_cudart" + "cuda_nvcc" + "cuda_cccl" + "libcublas" + "libcusparse" + "libnvjitlink" + "libcufft" + "cudnn" + "cuda_nvrtc" + "libnpp" + "nvidia-settings" + # blender with cuda is not foss?!? + "blender" + ]; + allowAliases = false + }; # Enable Nix flakes - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; + nix = { + settings = { + experimental-features = [ + "nix-command" + "flakes" + ]; + trusted-users = [ + "root" + config.osbmModules.defaultUser + ]; + }; - nix.channel.enable = false; + optimise.automatic = true; - # Nix registry configuration - nix.registry = lib.mkIf (inputs ? self && inputs ? nixpkgs) { - self.flake = inputs.self; - nixpkgs.flake = inputs.nixpkgs; - osbm-nvim = lib.mkIf (inputs ? osbm-nvim) { - flake = inputs.osbm-nvim; + channel.enable = false; + + registry = lib.mkIf (inputs ? self && inputs ? nixpkgs) { + self.flake = inputs.self; + nixpkgs.flake = inputs.nixpkgs; + osbm-nvim = lib.mkIf (inputs ? osbm-nvim) { + flake = inputs.osbm-nvim; + }; }; }; - # Trusted users - nix.settings.trusted-users = [ - "root" - config.osbmModules.defaultUser - ]; - - # Optimize store automatically - nix.optimise.automatic = true; - system.configurationRevision = inputs.self.rev or "dirty"; - }; }