mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
pinning nixpkgs with niv
This commit is contained in:
parent
a2fe1208b9
commit
49fac325cd
16
README.md
16
README.md
@ -96,6 +96,8 @@ sudo /run/current-system/bin/switch-to-configuration boot
|
|||||||
|
|
||||||
## Dependency management with niv
|
## Dependency management with niv
|
||||||
|
|
||||||
|
* https://nix.dev/tutorials/first-steps/towards-reproducibility-pinning-nixpkgs#dependency-management-with-niv
|
||||||
|
|
||||||
niv:
|
niv:
|
||||||
|
|
||||||
> Easy dependency management for Nix projects.
|
> Easy dependency management for Nix projects.
|
||||||
@ -122,6 +124,20 @@ Change the tracking branch of nixpkgs from unstable to 23.05:
|
|||||||
niv modify nixpkgs --branch nixos-23.05
|
niv modify nixpkgs --branch nixos-23.05
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Pinning Nixpkgs. At the top of your `configuration.nix` file, replace
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{}
|
||||||
|
```
|
||||||
|
|
||||||
|
with
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ config, sources ? import ../../nix/sources.nix, pkgs ? import sources.nixpkgs {}, ... }:
|
||||||
|
{}
|
||||||
|
```
|
||||||
|
|
||||||
## Add Home Manager with niv
|
## Add Home Manager with niv
|
||||||
|
|
||||||
Home Manager:
|
Home Manager:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, sources ? import ../../nix/sources.nix, pkgs ? import sources.nixpkgs {}, ... }:
|
||||||
let
|
let
|
||||||
# Import Home Manager with niv.
|
# Import Home Manager with niv.
|
||||||
home-manager = (import ../../nix/sources.nix).home-manager;
|
home-manager = (import ../../nix/sources.nix).home-manager;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, sources ? import ../../nix/sources.nix, pkgs ? import sources.nixpkgs {}, ... }:
|
||||||
let
|
let
|
||||||
# Import Home Manager with niv.
|
# Import Home Manager with niv.
|
||||||
home-manager = (import ../../nix/sources.nix).home-manager;
|
home-manager = (import ../../nix/sources.nix).home-manager;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, sources ? import ../../nix/sources.nix, pkgs ? import sources.nixpkgs {}, ... }:
|
||||||
let
|
let
|
||||||
# Import Home Manager with niv.
|
# Import Home Manager with niv.
|
||||||
home-manager = (import ../../nix/sources.nix).home-manager;
|
home-manager = (import ../../nix/sources.nix).home-manager;
|
||||||
|
Loading…
Reference in New Issue
Block a user