nixos/nix.nix
Gerg-L dc2db4a9bc realized I was inheriting nipkgs in my nixosSystems
added ways to use different branches of nixpkgs
made unfree packages have to specified
switched to nix master branch
moved sxhkd from a seperate flake
switched spotify and maim versions because both are broken on nixos-unstable right now
moved afk-cmds from local to remote
added flake-utils for easier devShell decleration
switched my mom's laptop to stable branch
2023-02-15 19:39:26 -05:00

39 lines
1 KiB
Nix

{nix, ...}: {
inputs,
lib,
pkgs,
self,
...
}: {
nix = {
package = lib.mkDefault nix.packages.${pkgs.system}.nix;
#automatically get registry from input flakes
registry =
(
lib.attrsets.mapAttrs (
_: value: {
flake = value;
}
) (
lib.attrsets.filterAttrs (
_: value: (
!(lib.attrsets.hasAttrByPath ["flake"] value) || value.flake == false
)
)
inputs
)
)
// {system = {flake = self;};};
#automatically add registry entries to nixPath
nixPath = (lib.mapAttrsToList (name: value: name + "=" + value) inputs) ++ [("system=" + ./.)];
settings = {
experimental-features = ["nix-command" "flakes" "repl-flake"];
auto-optimise-store = true;
warn-dirty = false;
flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}'';
keep-outputs = true;
keep-derivations = true;
};
};
environment.etc."booted-system".source = self;
}