Remove pre-24.05 workaround for pinning <nixpkgs>
This commit is contained in:
parent
c51b3f5a1a
commit
570e376e2e
2 changed files with 7 additions and 27 deletions
11
hive.nix
11
hive.nix
|
@ -1,15 +1,18 @@
|
||||||
let sources = import ./npins;
|
let sources = import ./npins;
|
||||||
in {
|
in {
|
||||||
meta = {
|
meta.nixpkgs = sources.nixpkgs;
|
||||||
nixpkgs = sources.nixpkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
defaults = { pkgs, ... }: {
|
defaults = { pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./pinning.nix
|
|
||||||
(import "${sources.home-manager}/nixos")
|
(import "${sources.home-manager}/nixos")
|
||||||
];
|
];
|
||||||
deployment.replaceUnknownProfiles = false;
|
deployment.replaceUnknownProfiles = false;
|
||||||
|
|
||||||
|
# Make <nixpkgs> point systemwide to the pinned nixpkgs above
|
||||||
|
# https://jade.fyi/blog/pinning-nixos-with-npins/
|
||||||
|
nix.settings.experimental-features = "nix-command flakes";
|
||||||
|
nixpkgs.flake.source = sources.nixpkgs;
|
||||||
|
nix.nixPath = ["nixpkgs=flake:nixpkgs"];
|
||||||
};
|
};
|
||||||
|
|
||||||
tohru = { name, nodes, ... }: {
|
tohru = { name, nodes, ... }: {
|
||||||
|
|
23
pinning.nix
23
pinning.nix
|
@ -1,23 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
let sources = import ./npins;
|
|
||||||
in {
|
|
||||||
# https://jade.fyi/blog/pinning-nixos-with-npins/
|
|
||||||
|
|
||||||
# We need the flakes experimental feature to do the NIX_PATH thing cleanly
|
|
||||||
# below. Given that this is literally the default config for flake-based
|
|
||||||
# NixOS installations in the upcoming NixOS 24.05, future Nix/Lix releases
|
|
||||||
# will not get away with breaking it.
|
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
|
||||||
|
|
||||||
# FIXME(24.05 or nixos-unstable): change following two rules to
|
|
||||||
#
|
|
||||||
# nixpkgs.flake.source = sources.nixpkgs;
|
|
||||||
#
|
|
||||||
# which does the exact same thing, using the same machinery as flake configs
|
|
||||||
# do as of 24.05.
|
|
||||||
nix.registry.nixpkgs.to = {
|
|
||||||
type = "path";
|
|
||||||
path = sources.nixpkgs;
|
|
||||||
};
|
|
||||||
nix.nixPath = ["nixpkgs=flake:nixpkgs"];
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue