From 60b0b4e88ea57e4aeb3019c2d4f94bd1a98cae11 Mon Sep 17 00:00:00 2001 From: randogoth Date: Thu, 12 Feb 2026 07:39:10 +0200 Subject: [PATCH] NUR integration --- flake.lock | 88 ++++++++++++++++++++++++++++++++++++- flake.nix | 4 ++ modules/system/nix-core.nix | 11 ++++- templates/home-flake.nix | 25 ++++++++++- 4 files changed, 124 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 3426ca1..21a6dd0 100644 --- a/flake.lock +++ b/flake.lock @@ -104,6 +104,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -202,6 +223,48 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "impermanence", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768598210, + "narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "c47b2cc64a629f8e075de52e4742de688f930dc6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "impermanence": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769548169, + "narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "7b1d382faf603b6d264f58627330f9faa5cba149", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "type": "github" + } + }, "lanzaboote": { "inputs": { "crane": "crane_2", @@ -331,6 +394,27 @@ "type": "github" } }, + "nur": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770872809, + "narHash": "sha256-Zgf1WFxWu5BdDokt6Quf5moQffNQ2LmjlhgSQ1ytxSQ=", + "owner": "nix-community", + "repo": "NUR", + "rev": "4eaab1a7671b8121ecccab744dc8fcc866191c65", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "pre-commit": { "inputs": { "flake-compat": "flake-compat_2", @@ -381,11 +465,13 @@ "inputs": { "disko": "disko", "flox": "flox", + "impermanence": "impermanence", "lanzaboote": "lanzaboote", "lix-module": "lix-module", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "nur": "nur" } }, "rust-analyzer-src": { diff --git a/flake.nix b/flake.nix index 65eb049..ff9c8e2 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,10 @@ url = "github:nix-community/impermanence"; inputs.nixpkgs.follows = "nixpkgs"; }; + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; lix-module.url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.93"; lix-module.inputs.nixpkgs.follows = "nixpkgs"; lanzaboote.url = "github:nix-community/lanzaboote"; diff --git a/modules/system/nix-core.nix b/modules/system/nix-core.nix index e5cfc99..564d5aa 100644 --- a/modules/system/nix-core.nix +++ b/modules/system/nix-core.nix @@ -1,6 +1,15 @@ -{ lib, ... }: +{ inputs, lib, ... }: { + nixpkgs.overlays = [ + (final: prev: { + nur = import inputs.nur { + pkgs = final; + nurpkgs = final; + }; + }) + ]; + nix.settings = { experimental-features = [ "nix-command" diff --git a/templates/home-flake.nix b/templates/home-flake.nix index 4ddf415..b31645f 100644 --- a/templates/home-flake.nix +++ b/templates/home-flake.nix @@ -10,11 +10,32 @@ nix-flatpak = { url = "github:gmodena/nix-flatpak/?ref=latest"; }; + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { nixpkgs, home-manager, nix-flatpak, ... }: { + outputs = { + nixpkgs, + home-manager, + nix-flatpak, + nur, + ... + }: { homeConfigurations."@ADMIN_USER@" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; + pkgs = import nixpkgs { + system = "x86_64-linux"; + config = { allowUnfree = true; }; + overlays = [ + (final: prev: { + nur = import nur { + pkgs = final; + nurpkgs = final; + }; + }) + ]; + }; modules = [ nix-flatpak.homeManagerModules.nix-flatpak ./home.nix