marleyos/modules/home/base/nix/default.nix

59 lines
1.3 KiB
Nix

{
pkgs,
inputs,
config,
...
}: {
config = {
nix = {
package = pkgs.lix;
# Pin system <nixpkgs> to flake nixpkgs version.
# i.e. for use in pkgs = import <nixpkgs> {}.
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
settings = {
trusted-users = [
"root"
config.marleyos.my.name
];
# Enable flakes.
experimental-features = [
"nix-command"
"flakes"
];
# Set up caches.
extra-substituters = [
"https://marleyos.cachix.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"marleyos.cachix.org-1:q2kEtqvS5CoQ8BmKlWOfOnN+fi4gUoSuL6HRKy37eCA="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# Disable that annoying "git tree is dirty" warning.
warn-dirty = false;
auto-optimise-store = true;
};
# Garbage collection.
gc.automatic = true;
};
nixpkgs.config.import = "${config.xdg.configHome}/nixpkgs/config.nix";
xdg.configFile."nixpkgs/config.nix".text =
# nix
''
{
allowUnfree = true;
}
'';
};
}