fix references

This commit is contained in:
Noah Masur
2025-02-17 14:05:23 -05:00
parent 7de88ba2b6
commit ebd7b88909
54 changed files with 272 additions and 216 deletions

View File

@ -6,7 +6,6 @@
}:
let
inherit (config.nmasur.settings) username;
cfg = config.nmasur.presets.programs.nixpkgs;
in
@ -110,51 +109,47 @@ in
''
);
# Set automatic generation cleanup for home-manager
nix.gc = {
automatic = config.nix.gc.automatic;
options = config.nix.gc.options;
nix = {
# Set channel to flake packages, used for nix-shell commands
nixPath = [ "nixpkgs=${pkgs.path}" ];
# For security, only allow specific users
settings.allowed-users = [
"@wheel" # Anyone in the wheel group
config.home.username # The current user
];
# Enable features in Nix commands
extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
'';
# Set automatic generation cleanup for home-manager
gc = {
automatic = true;
options = "--delete-older-than 10d";
};
settings = {
# Add community Cachix to binary cache
# Don't use at work because blocked by corporate firewall
builders-use-substitutes = true;
substituters = lib.mkIf (!config.nmasur.profiles.work.enable) [
"https://nix-community.cachix.org"
];
trusted-public-keys = lib.mkIf (!config.nmasur.profiles.work.enable) [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# Scans and hard links identical files in the store
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
};
};
};
nix = {
# Set channel to flake packages, used for nix-shell commands
nixPath = [ "nixpkgs=${pkgs.path}" ];
# For security, only allow specific users
settings.allowed-users = [
"@wheel" # Anyone in the wheel group
config.home.username # The current user
];
# Enable features in Nix commands
extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
'';
gc = {
automatic = true;
options = "--delete-older-than 10d";
};
settings = {
# Add community Cachix to binary cache
# Don't use at work because blocked by corporate firewall
builders-use-substitutes = true;
substituters = lib.mkIf (!config.nmasur.profiles.work.enable) [
"https://nix-community.cachix.org"
];
trusted-public-keys = lib.mkIf (!config.nmasur.profiles.work.enable) [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# Scans and hard links identical files in the store
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
};
};
}