55 lines
1.4 KiB
Nix
55 lines
1.4 KiB
Nix
|
{ config, pkgs, inputs, self, ... }:
|
||
|
|
||
|
{
|
||
|
nixpkgs = {
|
||
|
config = {
|
||
|
allowUnfree = true;
|
||
|
};
|
||
|
overlays = [
|
||
|
inputs.grim-hyprland.overlays.default
|
||
|
];
|
||
|
};
|
||
|
|
||
|
nix = {
|
||
|
package = pkgs.lix;
|
||
|
settings = let
|
||
|
flakeConfig = (import "${self}/flake.nix").nixConfig;
|
||
|
in {
|
||
|
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||
|
auto-optimise-store = true;
|
||
|
keep-outputs = true;
|
||
|
keep-derivations = true;
|
||
|
substituters = flakeConfig.extra-substituters;
|
||
|
trusted-public-keys = flakeConfig.extra-trusted-public-keys;
|
||
|
};
|
||
|
# Make nix commands use config's flake lock
|
||
|
registry = {
|
||
|
nixpkgs.flake = inputs.nixpkgs;
|
||
|
stable.flake = inputs.nixpkgs-stable;
|
||
|
};
|
||
|
nixPath = [
|
||
|
"nixpkgs=/etc/nix/inputs/nixpkgs"
|
||
|
"stable=/etc/nix/inputs/stable"
|
||
|
];
|
||
|
extraOptions = ''
|
||
|
!include ${config.age.secrets.nix-tokens.path}
|
||
|
'';
|
||
|
gc = {
|
||
|
automatic = true;
|
||
|
dates = "weekly";
|
||
|
options = "--delete-older-than 7d";
|
||
|
randomizedDelaySec = "30min";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
environment = {
|
||
|
systemPackages = [ pkgs.nh ];
|
||
|
sessionVariables.FLAKE = "${config.users.users.${config.my.user.username}.home}/.config/nixos";
|
||
|
etc = {
|
||
|
"nix/inputs/nixpkgs".source = inputs.nixpkgs.outPath;
|
||
|
"nix/inputs/stable".source = inputs.nixpkgs-stable.outPath;
|
||
|
"current-flake".source = self;
|
||
|
};
|
||
|
};
|
||
|
}
|