From 0a46d323870742641f71d6641d8db8581c146099 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Mon, 9 Oct 2023 11:25:17 +0200 Subject: [PATCH] working NUR flake --- flake.lock | 18 +++++++++++++++++- flake.nix | 15 ++++++++++----- home/firefox/addons.nix | 4 ++-- home/firefox/default.nix | 5 ++--- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 9b10abe..f7d4fe1 100644 --- a/flake.lock +++ b/flake.lock @@ -32,10 +32,26 @@ "type": "github" } }, + "nur": { + "locked": { + "lastModified": 1696831218, + "narHash": "sha256-UBtOKflBTUBfeFB7oYvMUzlc2uBLpZc+15JC9bPwKF4=", + "owner": "nix-community", + "repo": "NUR", + "rev": "be4322f9eaf6158baa87b3c08fc0a8d8805db181", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nur": "nur" } } }, diff --git a/flake.nix b/flake.nix index 57e9e93..ed0c786 100644 --- a/flake.nix +++ b/flake.nix @@ -3,25 +3,30 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + nur.url = "github:nix-community/NUR"; home-manager = { url = "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, home-manager }: { + outputs = { nixpkgs, home-manager, nur, ... }: { nixosConfigurations = { pim = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager { + { nixpkgs.overlays = [ nur.overlay ]; } + ({ pkgs, ... }@args: home-manager.nixosModules.home-manager { + inherit (args) lib pkgs config utils; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.pim = { - imports = [ ./home/home.nix ]; + imports = [ + ./home/home.nix + ]; }; - } + }) + ./configuration.nix ]; }; }; diff --git a/home/firefox/addons.nix b/home/firefox/addons.nix index 2527bf5..773871f 100644 --- a/home/firefox/addons.nix +++ b/home/firefox/addons.nix @@ -1,6 +1,6 @@ -{nurpkgs, lib, ...}@args: +{pkgs, lib, ...}@args: let - rycee-addons = nurpkgs.repos.rycee.firefox-addons; + rycee-addons = pkgs.repos.rycee.firefox-addons; custom-addons = import ./custom-addons.nix args; in { diff --git a/home/firefox/default.nix b/home/firefox/default.nix index 65b3397..18ba4a3 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -1,8 +1,7 @@ -{ pkgs, ...}@args: +args: let - nurpkgs = import (builtins.fetchTarball {url = "https://github.com/nix-community/NUR/archive/master.tar.gz"; sha256 = "1gb3wkmyl6xbs4kval2ml48nlil39853dj62rxfrlk9i2nky2ly4"; }) { inherit pkgs; }; - firefoxAddons = import ./addons.nix (args // {inherit nurpkgs; }); + firefoxAddons = import ./addons.nix args; firefoxSettings = { "browser.aboutConfig.showWarning" = false; "browser.toolbars.bookmarks.visibility" = "always";