1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

separate module eval and move example configuration

This commit is contained in:
Daiderd Jordan 2016-12-10 12:57:09 +01:00
parent 033499c0ed
commit f8df0090b6
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 38 additions and 29 deletions

25
default.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs ? import <nixpkgs> {}, config ? <darwin-config> }:
let
eval = pkgs.lib.evalModules {
check = true;
args = { inherit pkgs; };
modules =
[ config
./modules/system
./modules/system/activation-scripts.nix
./modules/system/defaults
./modules/system/etc.nix
./modules/system/launchd.nix
./modules/environment
./modules/launchd
./modules/services/activate-system.nix
./modules/services/nix-daemon.nix
./modules/programs/tmux.nix
./modules/programs/nix-darwin.nix
];
};
in
eval

View file

@ -2,24 +2,6 @@
let
eval = pkgs.lib.evalModules
{ check = true;
args = { pkgs = import <nixpkgs> {}; };
modules =
[ config
./modules/system
./modules/system/activation-scripts.nix
./modules/system/defaults
./modules/system/etc.nix
./modules/system/launchd.nix
./modules/environment
./modules/launchd
./modules/services/activate-system.nix
./modules/services/nix-daemon.nix
./modules/programs/tmux.nix
];
};
config =
{ config, lib, pkgs, ... }:
{
@ -179,14 +161,15 @@ let
'';
};
eval = import ../.. { inherit config; };
in {
inherit eval;
in
allowUnfree = true;
{
inherit (eval) config;
inherit (eval.config.system) build;
packageOverrides = self: {
nixdarwin = eval.config.system.build;
lnl.zsh = pkgs.runCommand pkgs.zsh.name
@ -243,16 +226,17 @@ in {
source $HOME/.vimrc.local
'';
vimrcConfig.vam.knownPlugins = with pkgs.vimUtils; (pkgs.vimPlugins // {
vim-nix = buildVimPluginFrom2Nix {
name = "vim-nix-unstable";
src = ../vim-nix;
};
});
# vimrcConfig.vam.knownPlugins = with pkgs.vimUtils; (pkgs.vimPlugins // {
# vim-nix = buildVimPluginFrom2Nix {
# name = "vim-nix-unstable";
# src = ../../../vim-nix;
# };
# });
vimrcConfig.vam.pluginDictionaries = [
{ names = [ "fzfWrapper" "youcompleteme" "fugitive" "surround" "vim-nix" "colors-solarized" ]; }
];
};
};
allowUnfree = true;
}