mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-25 00:19:12 +00:00
flake.nix: generate Nix paths and registry with the inputs
This commit is contained in:
parent
7c6d2ac4f0
commit
a6d591f31b
30
flake.nix
30
flake.nix
@ -140,19 +140,24 @@
|
|||||||
# I want to capture the usual flakes to its exact version so we're
|
# I want to capture the usual flakes to its exact version so we're
|
||||||
# making them available to our system. This will also prevent the
|
# making them available to our system. This will also prevent the
|
||||||
# annoying downloads since it always get the latest revision.
|
# annoying downloads since it always get the latest revision.
|
||||||
nix.registry = {
|
nix.registry =
|
||||||
|
(lib'.mapAttrs' (name: flake:
|
||||||
|
lib'.nameValuePair name { inherit flake; })
|
||||||
|
inputs)
|
||||||
|
// {
|
||||||
# I'm narcissistic so I want my config to be one of the flakes in the
|
# I'm narcissistic so I want my config to be one of the flakes in the
|
||||||
# registry.
|
# registry.
|
||||||
config.flake = self;
|
config.flake = self;
|
||||||
|
|
||||||
# All of the important flakes will be included.
|
|
||||||
nixpkgs.flake = nixpkgs;
|
|
||||||
home-manager.flake = inputs.home-manager;
|
|
||||||
nur.flake = inputs.nur;
|
|
||||||
guix-overlay.flake = inputs.guix-overlay;
|
|
||||||
nixos-generators.flake = inputs.nixos-generators;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Set several paths for the traditional channels.
|
||||||
|
nix.nixPath =
|
||||||
|
lib'.mapAttrsToList (name: source: "${name}=${source}") inputs
|
||||||
|
++ [
|
||||||
|
"config=${self}"
|
||||||
|
"/nix/var/nix/profiles/per-user/root/channels"
|
||||||
|
];
|
||||||
|
|
||||||
# Set several binary caches.
|
# Set several binary caches.
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [
|
substituters = [
|
||||||
@ -171,15 +176,6 @@
|
|||||||
nixpkgs.config.permittedInsecurePackages =
|
nixpkgs.config.permittedInsecurePackages =
|
||||||
[ "python3.10-django-3.1.14" ];
|
[ "python3.10-django-3.1.14" ];
|
||||||
|
|
||||||
# Set several paths for the traditional channels.
|
|
||||||
nix.nixPath =
|
|
||||||
lib'.mapAttrsToList (name: value: "${name}=${value}") inputs
|
|
||||||
++ [
|
|
||||||
"nixpkgs=${nixpkgs}"
|
|
||||||
"config=${self}"
|
|
||||||
"/nix/var/nix/profiles/per-user/root/channels"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Stallman-senpai will be disappointed.
|
# Stallman-senpai will be disappointed.
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user