add auto gc and alias nixpkgs to n

This commit is contained in:
uku 2023-11-07 19:01:37 +01:00
parent 23b396223e
commit 915bb9ec0d
Signed by: uku
GPG key ID: 7D01D7B105E77166
3 changed files with 29 additions and 15 deletions

View file

@ -1,7 +1,7 @@
{ {
config,
pkgs, pkgs,
inputs, nixpkgs,
getchvim,
... ...
}: { }: {
boot = { boot = {
@ -120,7 +120,7 @@
vesktop vesktop
grimblast grimblast
playerctl playerctl
inputs.getchvim.packages.${pkgs.stdenv.hostPlatform.system}.default getchvim.packages.${pkgs.stdenv.hostPlatform.system}.default
mate.eom mate.eom
osu-lazer-bin osu-lazer-bin
]; ];
@ -165,7 +165,26 @@
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
nix = {
gc = {
automatic = true;
dates = "3d";
options = "-d";
};
settings = {
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
};
};
nix.registry = let
nixpkgsRegistry.flake = nixpkgs;
in {
nixpkgs = nixpkgsRegistry;
n = nixpkgsRegistry;
};
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions

View file

@ -10,19 +10,19 @@
}; };
}; };
outputs = inputs: { outputs = {nixpkgs, ...} @ inputs: {
nixosConfigurations.fuji = inputs.nixpkgs.lib.nixosSystem { nixosConfigurations.fuji = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [./fuji.nix]; modules = [./fuji.nix];
specialArgs = {inherit inputs;}; specialArgs = inputs;
}; };
nixosConfigurations.kilimandjaro = inputs.nixpkgs.lib.nixosSystem { nixosConfigurations.kilimandjaro = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [./kilimandjaro.nix]; modules = [./kilimandjaro.nix];
specialArgs = {inherit inputs;}; specialArgs = inputs;
}; };
formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.alejandra; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
}; };
} }

View file

@ -1,9 +1,4 @@
{ {...}: {
config,
pkgs,
inputs,
...
}: {
imports = [ imports = [
./common.nix ./common.nix
./hardware/kilimandjaro.nix ./hardware/kilimandjaro.nix