This commit is contained in:
Daniel Langbein 2023-09-12 12:43:51 +02:00
parent 4131abfe82
commit 9cb7bbbf0b
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
5 changed files with 51 additions and 1 deletions

View File

@ -94,7 +94,7 @@ Remove old generations from EFI:
sudo /run/current-system/bin/switch-to-configuration boot sudo /run/current-system/bin/switch-to-configuration boot
``` ```
## Install Home Manager with niv ## Add Home Manager with niv
niv: niv:
@ -134,6 +134,18 @@ Use the corresponding branch:
niv add nix-community/home-manager -n home-manager -b release-23.05 niv add nix-community/home-manager -n home-manager -b release-23.05
``` ```
## Add NUR with niv
> The Nix User Repository (NUR) is community-driven meta repository for Nix packages.
>
> ... packages are built from source and are not reviewed by any Nixpkgs member.
>
> https://github.com/nix-community/NUR
```shell
niv add nix-community/NUR -n NUR
```
## disko and nixos-anywhere ## disko and nixos-anywhere
* Introductory presentation: https://pad.lassul.us/cccamp-workshop * Introductory presentation: https://pad.lassul.us/cccamp-workshop

View File

@ -19,6 +19,8 @@ in
(import "${home-manager}/nixos") (import "${home-manager}/nixos")
../../modules/home-manager.nix ../../modules/home-manager.nix
../../modules/nur.nix
../../modules/base.nix ../../modules/base.nix
../../modules/programs.nix ../../modules/programs.nix
../../modules/autostart.nix ../../modules/autostart.nix

View File

@ -19,6 +19,8 @@ in
(import "${home-manager}/nixos") (import "${home-manager}/nixos")
../../modules/home-manager.nix ../../modules/home-manager.nix
../../modules/nur.nix
../../modules/base.nix ../../modules/base.nix
../../modules/programs.nix ../../modules/programs.nix
../../modules/autostart.nix ../../modules/autostart.nix

22
modules/nur.nix Normal file
View File

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
{
# Import NUR.
#nixpkgs.config.packageOverrides = pkgs: {
# nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
# inherit pkgs;
# };
#};
# Import NUR with niv.
nixpkgs.config.packageOverrides = pkgs: {
nur = import (import ../nix/sources.nix).NUR {
inherit pkgs;
};
};
# Test if NUR was imported successfully.
#environment.systemPackages = with pkgs; [
# nur.repos.mic92.hello-nur
#];
}

View File

@ -1,4 +1,16 @@
{ {
"NUR": {
"branch": "master",
"description": "Nix User Repository: User contributed nix packages [maintainer=@Mic92]",
"homepage": "https://nur.nix-community.org/",
"owner": "nix-community",
"repo": "NUR",
"rev": "85d19938ef33d82db0207c39f11f5947d5a5215e",
"sha256": "0vxjj8czwcg2vz42r5jknaxg1z6jhq1djf6zs5rq70mhsb041v3x",
"type": "tarball",
"url": "https://github.com/nix-community/NUR/archive/85d19938ef33d82db0207c39f11f5947d5a5215e.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"home-manager": { "home-manager": {
"branch": "release-23.05", "branch": "release-23.05",
"description": "Manage a user environment using Nix [maintainer=@rycee] ", "description": "Manage a user environment using Nix [maintainer=@rycee] ",