diff options
author | Adrian Kummerlaender | 2019-03-02 20:49:45 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2019-03-02 20:49:45 +0100 |
commit | f6cdb4a4b050581a257789ab14a9557aba7ff37b (patch) | |
tree | 9956e35aa16fc03cb5a7441b768948cdcee5e50b | |
parent | b0725d88eea40e1291b7e42a1e958d1a7e18eba3 (diff) | |
download | nixos_home-f6cdb4a4b050581a257789ab14a9557aba7ff37b.tar nixos_home-f6cdb4a4b050581a257789ab14a9557aba7ff37b.tar.gz nixos_home-f6cdb4a4b050581a257789ab14a9557aba7ff37b.tar.bz2 nixos_home-f6cdb4a4b050581a257789ab14a9557aba7ff37b.tar.lz nixos_home-f6cdb4a4b050581a257789ab14a9557aba7ff37b.tar.xz nixos_home-f6cdb4a4b050581a257789ab14a9557aba7ff37b.tar.zst nixos_home-f6cdb4a4b050581a257789ab14a9557aba7ff37b.zip |
Centrally define set of custom packages
Weirdly I did not find a better way to pass a userspace "<mypkgs>"
channel throughout the home-manager expression tree.
i.e. adding a "mypkgs ? import <mypkgs> { }" argument to all expressions
failed somewhere inside Nix.
However this way has the benefit of making it very easy to augment the
derivations maintained in pkgs.kummerlaender.eu with additional packages.
-rw-r--r-- | custom.nix | 4 | ||||
-rw-r--r-- | gui/gtk.nix | 5 | ||||
-rw-r--r-- | gui/pkgs/nvim-gui.nix | 8 | ||||
-rw-r--r-- | gui/vim.nix | 4 | ||||
-rw-r--r-- | home.nix | 4 |
5 files changed, 14 insertions, 11 deletions
@@ -33,5 +33,9 @@ in { }; }); }; + + pkgs = mkOption { + type = types.attrs; + }; }; } diff --git a/gui/gtk.nix b/gui/gtk.nix index abfc889..9d63b0a 100644 --- a/gui/gtk.nix +++ b/gui/gtk.nix @@ -2,14 +2,13 @@ let hidpi = config.custom.hidpi; - mypkgs = import (fetchTarball "https://pkgs.kummerlaender.eu/nixexprs.tar.gz") { }; in { gtk = { enable = true; theme = { name = "oomox"; - package = mypkgs.oomox-gtk-theme { + package = config.custom.pkgs.oomox-gtk-theme { accent_bg = "aadb0f"; bg = "d8d8d8"; fg = "101010"; @@ -38,7 +37,7 @@ in { iconTheme = { name = "oomox-archdroid"; - package = mypkgs.oomox-archdroid-icon-theme "909636"; + package = config.custom.pkgs.oomox-archdroid-icon-theme "909636"; }; font = { diff --git a/gui/pkgs/nvim-gui.nix b/gui/pkgs/nvim-gui.nix index b5093e2..5cca035 100644 --- a/gui/pkgs/nvim-gui.nix +++ b/gui/pkgs/nvim-gui.nix @@ -1,7 +1,5 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: -let - mypkgs = import (fetchTarball "https://pkgs.kummerlaender.eu/nixexprs.tar.gz") { }; -in pkgs.neovim-qt.override { - neovim = mypkgs.custom-neovim; +pkgs.neovim-qt.override { + neovim = config.custom.pkgs.custom-neovim; } diff --git a/gui/vim.nix b/gui/vim.nix index 09c51e1..46ab079 100644 --- a/gui/vim.nix +++ b/gui/vim.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { home = { @@ -11,7 +11,7 @@ # nvim-qt using vim configuration packages = let - nvim-gui = import ./pkgs/nvim-gui.nix pkgs; + nvim-gui = import ./pkgs/nvim-gui.nix { inherit pkgs config; }; in [ nvim-gui pkgs.xclip # required to access clipboard in nvim-gui @@ -1,6 +1,8 @@ -{ pkgs, config, ... }: +{ config, pkgs, ... }: { + custom.pkgs = import <mypkgs> { }; + imports = [ # define options custom to this config ./custom.nix |