This commit is contained in:
Osman Faruk Bayram 2025-11-06 08:48:01 +03:00
parent a80eeb2a16
commit aa6bbc2b48

View file

@ -7,8 +7,9 @@
{
config = lib.mkIf config.osbmModules.nixSettings.enable {
# Allow unfree packages
nixpkgs.config.allowUnfreePredicate =
pkg:
nixpkgs = {
config = {
allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"vscode"
"discord"
@ -35,38 +36,36 @@
"nvidia-settings"
# blender with cuda is not foss?!?
"blender"
];
nixpkgs.config.allowAliases = false;
allowAliases = false
};
# Enable Nix flakes
nix.settings.experimental-features = [
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) {
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";
};
}