From fd51e1f3965ed9fcf0d52f51830b6384e804a5de Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Mon, 16 Oct 2023 17:45:15 +0200 Subject: [PATCH] use NUR as flake input closes #12 --- flake.nix | 37 ++++++++++++++++++------------------- home/default.nix | 7 +++++-- home/firefox/addons.nix | 2 +- home/firefox/default.nix | 6 +++--- switch.sh | 2 +- 5 files changed, 28 insertions(+), 26 deletions(-) diff --git a/flake.nix b/flake.nix index 14776cc..9bf43bb 100644 --- a/flake.nix +++ b/flake.nix @@ -19,25 +19,24 @@ }; }; - outputs = { nixpkgs, home-manager, homeage, agenix, ... }: { - nixosConfigurations = { - pim = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - agenix.nixosModules.default - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.pim = { - imports = [ - ./home - homeage.homeManagerModules.homeage - ]; - }; - } - ]; - }; + outputs = { nixpkgs, home-manager, homeage, agenix, nur, ... }: { + nixosConfigurations.pim = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + agenix.nixosModules.default + home-manager.nixosModules.home-manager { + home-manager.extraSpecialArgs = { inherit nur; }; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.pim = { + imports = [ + ./home + homeage.homeManagerModules.homeage + ]; + }; + } + ]; }; }; } diff --git a/home/default.nix b/home/default.nix index 45a4f0d..68f3207 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,10 +1,13 @@ -{ pkgs, config, ... }: +{ pkgs, nur, ... }: +let + nur-no-pkgs = import (nur) { inherit pkgs; nurpkgs = pkgs; }; +in { imports = [ ./bash ./neovim - ./firefox + (import ./firefox nur-no-pkgs) # TODO: bit of a hack, but better than before ./ssh ./syncthing ./alacritty diff --git a/home/firefox/addons.nix b/home/firefox/addons.nix index 2527bf5..cc519fd 100644 --- a/home/firefox/addons.nix +++ b/home/firefox/addons.nix @@ -1,4 +1,4 @@ -{nurpkgs, lib, ...}@args: +{ nurpkgs, lib, ... }@args: let rycee-addons = nurpkgs.repos.rycee.firefox-addons; custom-addons = import ./custom-addons.nix args; diff --git a/home/firefox/default.nix b/home/firefox/default.nix index 65775fa..e18c5c0 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -1,8 +1,8 @@ -{pkgs, lib, ...}@args: +nurpkgs: +{ pkgs, lib, ... }@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 // { inherit nurpkgs; }); firefoxSettings = { "browser.aboutConfig.showWarning" = false; "browser.toolbars.bookmarks.visibility" = "always"; diff --git a/switch.sh b/switch.sh index ffed5f4..7d1bd33 100755 --- a/switch.sh +++ b/switch.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -sudo nixos-rebuild switch --flake ./#pim --impure +sudo nixos-rebuild switch --flake ./#pim